The connection is loose and too much current is passing through too small of an area of contact. The connector plug is acting just like a fuse when too much current passes theough it, heating up and burning.
Possible there is some corrosion forming there causing an issue, but if doesn't look that way from the pics.
You'll want to clean the burn off of the pins, pull the socket out of the new connector and crimp the sides together tighter if possible to make a better connection there.
This is certainly the problem. My 92 Polo had a intermittent running issue for months and I couldnt track it down. I replaced fuel pump, regulator and relay, still would shut off for no reason.
Shut the passenger door one day while it was running and it died. A few minutes later I was looking at that plug and every time I wiggled it the car would start to die.
I removed the wire from the connector on the car harness side and pinched the terminal together, re-inserted the wire into the connector, plugged it back in and everything was fine.
It looks like you will be needing a new connector tho.