Replace the switch, and cut out the burned terminals from the melted plastic connector body. You'll find at least two wires are hardened on the first four inches or so. That's from being hot. Solder won't stick to it and crimp-on terminals won't make a good connection. That will lead to a repeat failure.
Cut off that hardened part of the wires, splice in new sections, solder them, and be sure no sharp points of wire are sticking up, then seal them with heat-shrink tubing. Crimp on new terminals but then solder them too. Cut the melted plastic away from the connector body, then plug the new terminals onto the switch separately. Be sure they're tight. Loose connections cause resistance which causes heat, and a repeat failure.