@jaracer may be on the right track. I would look closely at the connector plugs to the headlight switch, especially the spade connector for the feed from the switch to the headlights. Depending on how this was wired when the toggle switch was installed, it could also be the power feed to the switch. From your description, that would seem the most likely bottleneck in the system. If we knew how the toggle switch was connected, that could suggest the failure point. A failure of one of the wire terminations at a spade connector is possible. I've seen factory crimps so poor that they were only making contact through a few strands of wire. They can also be loose enough to intermittently lose contact due to vibration, which kinda sounds like what's going on here. 2X on what @jaracer said about checking the plug for heat damage. If everything worked with the toggle switch, that seems to rule out any problem "downstream" from the switch, and he's replaced everything connected with that except for the wiring. There is another possibility mentioned by others here. If the switch is imported, it is highly suspect. I owned a NAPA store in my past life and am no stranger to defective parts. NAPA was always pretty good on parts quality, selling almost all US made parts back in the day. I had a customer bring in a headlight switch and ask for a replacement. He said he got it at Auto Zone, everything fit but it didn't work. Asked him why he didn't take it back for warranty replacement. He said, "I would, but this is the fifth one I've tried from there, and none worked." He came in a few days later and told me that the US made Echlin switch I sold him worked perfectly. He was a regular customer after that. Don't take this as a plug for NAPA, just be advised that imported electrical parts are questionable.