you don't say if there's any check engine light on but this sounds like a lack of fuel and could be a lack of fuel pressure from the electrical pump at the tank.
1st thing to try is to remove the fuel filler cap and then flick the ignition on whilst listening for the brief ‘buzz’ of the pump
If the connections to the pump are corroded or damaged then the pump could stop at any time or could not be running at full speed. Check that its relay switches in and out and the relay contacts are clean and bright – replace the relay if in any doubt and do the same for the fuse,Ideally measure the pressure at the injector rail (should usually be around 3Bar / 45psi +) and if this is low check the pump as described and also consider changing the fuel filter as if this partially blocked this too will reduce pressure.
You can also get this issue with contaminated fuel , if there’s water or dirt in the tank then either the petrol floats on top of the water or the filter sock on the pump is choked up – so if the other things check out then I’d consider pulling out the fuel pump and cleaning the filter sock
And one other thing to try is to loosen off the fuel filler cap, as there’s a 1 way valve built into the cap to let air into the tank and so prevent a vacuum from being created as the fuel leaves the tank to the engineIf this helps then replace the cap with a new item
Ok to get the ESP message up then this may limit the engine speed as the ESP is the electronic stabilty program and uses the brakes to control individual wheel speeds and help counter a spin or instability
The quickest route to repair is to have the car plugged into a diagnostic machine which will read off the fault code stored in the ECU (providing the light is still on at this point) and indicate which sensor has failed or whether the fault is more serious.
However with ABS / ESP systems 99% of the time its a problem with one of the wheel speed sensors and I'd first check the connections at all four corners first for any signs of corrosion or chafed wiring.The sensor is located in the wheel hub so you'll have to remove each wheel in turn to inspect them all.Also check that the toothed wheel that the sensor points to is clean and free of any debris.you can check each sensor's function by plugging the two output wires into an AC voltmeter and spinning the wheel quite quickly, you should get a voltage signal that increases with rev's.
Its possible that the fault is only a bad connection to one of the wheel sensors.This may be remedied by removing each wheel in turn and unplugging each sensor and cleaning the contacts with a squirt of electrical contact cleaner. Then refitting.
AlsoIf the battery has been disconnected then it is necessary to perform a zero point calibration of the steering angle sensor. To do this you need to start the car and turn the steering wheel all the way to the left and then all the way to the right 5 or 6 times