I got a can of the spray on electrical tape (similar to marine electronics spray) from Colin. It's worked great for years on more than a few PTW's. Last time I used it was in a knee deep swamp and everything was damp/soaked (obviously the gun didn't go underwater...but there wasn't much care taken otherwise).
Very light coats is the way to go...let dry between. If it goes on too thick it risks jamming/gumming up microswitches. I just replaced the side board on a buddy's PTW because it was put on too thick. It's fixable...but you've got to pick it all out and that's pretty fiddly.
Another potential downside is that if you apply too much (IIRC the can says to apply 2-3 applications) the front board will be very hard to put into the trigger/mech unit...and very, very, very hard to pull out. You can clean it off the very edges so there's no dimension issues...learned that the hard way.
I just used a bit of painters tape over the optical contacts when I spray them.