The shop said it was the wring harness. Not much more detail than that. They replaced both harnesses and we will see if that solves the problem.
Thanks to everyone.
The connectors probably got a little burned and the pins or sockets carbonized is all. Headlights draw a lot of current. Replacing the portion of the harness affected should fix it straight away. Best of luck.
Years ago I had a VW Rabbit and it had almost exactly this same problem, only for the fuel pump, not the headlights. The fuel pump current burned the connector and caused the fuel pump to become intermittent. The symptom was the car would suddenly die while on the freeway. You’d wind up on the side of the road stranded, waiting for a tow truck. So think positive, your problem – while inconvenient – is a better one to have than the one I had.
I think VWs in general have this problem. My earlier Golf too had this a 1-2 times a year. Now yesterday I changed my Hondas headlight first time in 8 years! I still loved my Golf though.