Loose push-on connectors are susceptible to machine vibrations.
Check to see if the wire push-on connectors are squeezing the microswitch contact tabs good.
Sometimes you have to pull them off, give them a slight squeeze with a good pair of pliers just so the push-on slip onto the contact tabs tightly.
Also, check the microswitch itself for proper operation.
Slightly maladjusted or bent screw attachments for the microswitch may put it just a touch out of proper position for the handle mech to touch the switch's plunger actuator.
Someone pulling really hard on the handle with the micro switch's actuator too close, could cause breakage.
Also...that orange handle mech bumper melting can sometimes drip onto the microswitch...that's more rare tho.
Because there's not a lot of room to work in there, it's best to remove the whole handle mech.
Once you do it, it becomes a fairly easy thing to do.
I like taking out the whole bill acceptor unit to give me room.