De-Pin a headlight switch connector
I would find replacements and do so, End of story. Anytime these are overheated, loose from any cause, rusted, corroded, they need to be replaced. Not only can they cause melt damage to the plastic connector housing, which are hard to replace, but they can also damage the switch itself.
If you don't have the proper crimper "W" pattern, just crimp them the best you can and then solder them. Get on ebay, buy a small bottle / can of either paste or liquid rosin core (for electrical) flux, and get some lead based electrical solder. DO NOT let someone steer you into the plumbing section of a store!!! That is acid core solder and acid flux!!!