Those switches do wear out and fall apart internally. “Lifting” the harness may be masking an internal problem, or you may just have a loose connection. Remove the headlight, unbolt the “pot” and it should fall away far enough forward to allow access to the bottom connection. Pull the switch out where you can have a look and determine the problem. From memory I think there are only a couple of bolts holding it in, from below?
My ‘78 550K had a very similar problem. I remember taking the switch apart, spotting the issue, but in the end a new switch was the only fix.......