Headlights go on and off when engine is hot

If the terminals are getting hot and melting the connector/insulator, why?

I'd find the issue causing the problem. Melted connectors are a symptom.

Relays are a great solution to the headlight performance and switch issue. Part of the reason I started building kits.

^^^yes I agree. apologies, I forgot to mention the headlight switch was original too, and it was reeealy crusty. had high resistance throughout the internal contacts....as we all know, resistance creates heat.....I installed a new switch the same time I fixed the connector.