Have Mercedes Questions? Ask a Mechanic for Answers ASAP
The ESP system is not capable of shutting the engine down. Malfunciton message can come on before engine shuts down if the alternator is not charging. So please check that first of all.
Most common reason for engine shutting down is faulty crankshaft position sensor. This can also cause the camshaft sensor fault code.
I recommend to have the fault codes checked with diagnostic tool in both ESP and engine control units.