Personally I would be happy to use contact cleaner spray. I would however probably go at it with a cotton bud rather than spraying it about the place and hoping it will do magic. Just spray some on a tin lid or into a bottle cap and use that to wet the cotton bud.
Most switches are 90% plastic parts and the spray will not mess them up at all.
Same goes for that residue at the bottom of your socket - at a guess it must be somewhat conductive if it is leaking current and messing up the switching signals.
Again I would use a cotton bud, ideally soaked in the above cleaner spray - avoid any abrasives that will mess the gold flashing on the pins, but you need to clean out all of that stuff at the bottom of the socket.
FWIW by day I am an electronics design engineer so have used this stuff off and on for 25 years.
Paul C