Run M119 to see state off, then trigger it and run M119 again and it should be shown enabled with your mods. Then you know reading the end stop works at least. Only after that start searching deeper for problems.
// bool invertEndstop,bool minEndstop, bool endstopPullup> var(float steps per mm,float speed, float max.distance)
#define MOTOR_DRIVER_1(var) StepperDriverWithEndstop<35,33,37,0,1,ORIG_Z_MAX_PIN,0,1,1> var(20,10,110)
you have said it is min endstop and homing should happen in that direction.
Also note that end stop is only tested during homing, so only
G205 P<motorId> S<0/1> E<0/1> - Home motor, S1 = go back to stored position, E1
= home only if endstop was never met, meaning it was never homed with motor.
will check for end stop. All other commands will ignore it anyway.