AFAIK its unusually that it just gets gunked up, my first port of call would involve some contact cleaner and wd40. You could always try a good hard slam too ...
As posted the switch is part of the bonnet catch mechanism, find the wire and see if you can identify the plunger.