Sketch not running as expected
It was too damn simple...

I just had to add a line inside the else block in the loop function.

digitalWrite(brake1, LOW);


This was happening because the first time the threshold limit was crossed the brake1 pin was left HIGH and was never set to LOW again, which caused a permanent brake in the motor.

I'm too damn stupid. But I still don't have any idea how will I use this code with multiple sensors and motors.