Had exactly the same issue earlier this year. Did all of the same maneuvers. Reflowed the opto board pins then finally replaced it. Replaced the optos. Glued the connectors to the opto board like Lloyd suggests.
Frustrating weeks of screwing with all of these approaches; something would seem to work for a few games then it would start up again.
Finally I unplugged then replugged every plug off of the MPU and DMD boards that had anything to do with those switches and it stopped.
It’s just a sketchy system.