One of three things. The switch has to be OEM on this due to amperage requirements. If a aftermarket switch the contact design is not aduquet for the load. Second, look for a short in the wiring or terminals that is intermittent. Does the back of the switch look burned? Third, a high resistance in the wiring terminals on the switch causing excessive heat at the back of the switch and melting. Having 32 amps switched with a toggle switch is at the limit of design. Especially with spade terminals. Make sure to replace the terminals on the wires with high load, high temp terminals.
On that little-ole countertop fryer, all of it’s operating current (even the elements) is carried by that switch. As fixbear alluded to, you probably have wire terminals and wires connecting to the switch which are damaged due to prior overheating from faulty connection(s). If you’re simply replacing the switch without installing new wire terminals on fresh, clean wire strands, then the old wire/connections will simply continue getting hot and frying your new switches.