Recently a string of rear brake lights burned out prematurely. This last bulb then had a long working streak, but on a preflight inspection, I found that the lights only came on with the rear brake.
After cleaning the front brake switch blade terminals and clicking it with a fingertip, it got stuck 'on' and became hot to the touch, so I just replaced it with a used OEM part.
After disassembly which unavoidably breaks plastic rivets, I found what looked like significant erosion to and maybe welding of the contacts. The bottom side of the spring assembly started to melt into the plastic underneath it.
Doesn't look too bad......until you get to the other side
The design of the holes in the bottom of the housing makes spraying with contact cleaner less effective. You might have luck filling it completely, shaking it around and clicking it a lot but this one was too far gone.
If you have an older bike or do a lot of city miles, it could be worth keeping a spare in your toolkit as well as a clutch safety switch. And a little JIS screwdriver to get at these.