What can be done with faulty switches?
I would inspect a faulty switch to make sure you don’t have a cold solder joint and occasionally spray it with a quality contact cleaner. Many switches oxidize due to the climate, humidity and constant use. Lever switches often get bent on Fender Stratocaster and Telecaster guitars. At times the switch can be put back into proper position. Switches can get damaged when taking pickguards out of the instrument before the strings are taken off. I’ve seen pickguards pulled out of an instrument before removing the strings and all the contacts on the lever switch were bent or broken. If you have preventative maintenance on your equipment it will give you many years of fun. Make sure you spray the contacts with a quality contact clearer and it will help reduce oxidation and give you clean contacts.