I opened the switch box and it is clean.
This is what I do: With switch disconnected (and the lathe unplugged of course), use an ohm meter to insure proper conductivity between contacts with the switch closed. Take photos of everything, especially wire connections, mark wires with tags, and make a diagram.
Take the switch apart and inspect the contact points. (Some switches are held together by rivets which I drill out.) Caution: switches often have springs and levers and must be put back together correctly. Take care.
Contact points sometimes become burned with normal use, high humidity, etc. This happens more with high current and loads but can happen with even small devices. It doesn't take much degrading for a switch to make smoke and a sound.
Burned contacts will be obvious. If so,
the best thing to do is replace the switch since once the contacts are even slightly degraded they will only get worse. I did that for my 18" bandsaw a couple of years ago - I found a switch on Amazon that had the right specs, physically fit, and even looked the same.
But in the short term contacts can often be cleaned with fine sandpaper and put the machine back in service for at least a while. I always coat switch contacts with dielectric grease before reassembly. Test the switch after reassembly and double-check the connections before applying power.
Over the last 1/2 century I've fixed and replaced many such switches. I've temporarily fixed a few lathes for people until we could find a new switch. Switch failed on one of my drill presses and one of my own lathes. The pressure-activated switch failed on my big air compressor and the maker sent a new one at no charge. A friends air compressor quit just last week and we did the debugging over the phone.
My 2-cents: If not comfortable with electrical circuits maybe don't even try. It's simple once you know how, but make a mistake and the shock you feel might be your last. Find someone who can do it and watch and learn. Someone with experience could also evaluate the switch and decide if it's worth trying to make a temporary fix.
JKJ