My very first electric(?) help thread

First let me describe the scene for you:
It was 00:00 Finnish local time, raining cats + dogs (read: very wet weather) and I was driving down some bumpy old roads in my K10. When I hit the first pothole the engine died but I managed to get it started after the third or fourth try, then I hit the second bump and it died again, this time I did not manage to get it started so I turned on the warning lights, popped the bonnet open, stepped out of the car and lit up my last cigarette.

Some time later my mate arrived with WD40 and towels to try and clean the inside of the distributor, (we also checked all cables and connections) and we managed to get it running. I drove along maybe half a kilometer and hit another bump. We waited a while and started it again no problem. When I got back onto asphalted roads I drove super carefully, avoided every bump and got home safely.

My theory is that because I recently put in a new ballast resistor there must be some new electrical problem. As they say "once you fix one problem you usually find two new"
Disregard my original post it must have been moisture in the distributor, as I suspected. Also admin or mods please feel free to move this thread to a more suitable part of the forum if you think it shouldn’t be in the mechanical section.

Okay guys, so today I changed spark plugs and afterwards while checking functions I turned on the hazard lights, only the right side lit up and eventually after about 30 seconds the other side lit up. "Very strange, goddamned electric!" I thought to myself and knocked on the relays with the grip of a screwdriver on the right inside side of the engine room (the ones covered by a plastic bag) and it worked again...
...until I turned them off and on again, not discouraged by this bull#### I hit the road and everything was fine, or so I thought.
My headlights died and the check battery light on the dash lit up a very angry red colour. I applied some throttle and the lights turned on again.

Can it perhaps be that I messed up the relays?