On Jeeps, Harleys, etc. I use GOOP Flexible Epoxy. Grabs / holds extremely well. Unlike regular glues that are affected by vibration, with vibration, the goodie will not break loose if you use Goop.
Another plus of the Goop is that it will release when heat is applied.... and when you remove the goodie, there is no damage from the adhesive on the plastic..
For your switch, maybe just extreme hold 3M double sided tape...