Trouble overiding a push switch with a transistor

I like alto777's suggestion. If it's not a code problem, I was just going to suggest replacing the resistors and transistors with relays, small ones like this: https://www.digikey.com/en/products/detail/coto-technology/9001-05-01/301690
Pay attention to the coil polarity because flyback diodes are built in.