Underbonnet fuse box,,, 6 small fuses in this, check if any are lose, or dirty...
This is not so much do with your braking system (ESP), more to do with cutting out,,,,
All these are part of the system..
Re reading your thread, think the ESP fault is a by product of another fault,,.As DD intimated at,,,, car stalls, no vss signal, esp is coming on..
When it stops, does it just cut out, as in stops dead, or slowly stops, you know when its going to happen, as such....
(You have an electric fuel pump, and a fuel pump relay fitted.)
So might seem a daft question, but,,, does it start, straight away, or you have to let it cool down.
If you have to let it cool down,, for how long....
If it starts straight away, when you switch the ignition back on, can you hear a louder buzz, from the back, than normal heard..
You might not notice before, but next time it happens, can you check...