Writing out what you want to achieve presumably looks something like ...
initially ...
open a wifi connection to an access point
open a transport layer connection to a server / your computer
next ...
every 1 ms
> check connection, handle disconnection
> read MPU6050 acceleration (x,y,z values)
> send to a server (timestamp, x,y,z values)
> and repeat
You need to be able to detect loss of WiFi connection and / or transport connection and reconnect.
One option would be to start by getting the sensor talking locally to the ESP32 and displaying the results, in which case this approach could be helpful as a building block ..
https://randomnerdtutorials.com/esp32-m ... eb-server/
And then get this running faster and expand on this to stream the data to your server ...
If you don't need the sensor data in 'real time' and / or you need to retrieve it, then writing the data to a microSD card attached to the ESP32 could be an option. Then you could retrieve the data if the WiFi connection fails, for example.