Ever seen someone touch two bare wires together under power?
With loose or dirty connections that is what is happening. Arch or surge of power at the weak point. Instant heat build up. A good cleaning and secure assembly should prevent issues.
Inspect
threading for discoloration - If discolored, damage has already been done. Original switch is a direct replacement.