Digital Pins Output Pins not Being Written to

Does your Z Axis joystick have automatic centering?

P.S.: I just modified your code as it was ... In your code the vertical motor is controlled by the Z Axis!
Would you like it to be controlled by another axis?

I have added leds in the Wokwi simulation so that you can see what happens to the pins 10, 11 and 12 when you move the upper slide potentiometer (Z Axis emulation).

See here: https://wokwi.com/projects/381369432966489089

Code as in post #15.