Sounds like you have some wiring issues you need to address because you have a short somewhere. Too much heat and bad grounds could also contribute to it stalling.
I just recently pick up a 89 scirocco with the 8v engine. Well the temp gauge started flashing and the engine just shut down it would start but only for a sec or 2 and when I tried to give it some gas it would still shut down. I've search all over the inernet and could find exactly what my car was doing.
it was low on coolant so I toped it off once the engine cooled down it started up no problem but the temp gauge would still go up about 3/4 then start to flash again. I was thinking it was the thermostat so I changed that. I have read that it could be the coolant temp sensor.
once I changed out the thermostat I let it run drove it around the block a couple of times to let it get up to temp then let it sit running the temp was steady in the middle it would raise to almost 3/4 then the fan kicks on and goes back down. I went to go park it and the engine shut off again and did the same thing as before let it cool down and it ran fine. I'm thinking it's the sensor but not a 100% sure.
Another issue it is having is when I turn on the lights the temp gauge starts to flash and the gauge would stop working kind of on and off and the clock would reset.
sorry for the novel but I trying to figure this out so I can get it inspected
I got the gauge and temp light fixed it was the ground wire that bolts to the valve cover.
but I'm still have the problem with it shuting down after I drive it for a little bit, could it be my fuel pump because when its having the problem the fuel pump is loud.