This happened literally because someone swapped two wires. Escalators typically use compound-wired DC motors because compound wiring gives you good torque and efficiency. Differential compound wiring (where half of the field windings are out-of-phase) also gives good speed regulation under varying loads, which is what you want in an escalator.
The big gotcha if a differential compound motor stalls from too much load, it can go unstable. It will reverse rotation and run as fast as possible until something blows up… which is why you must detect that and trip a shutdown. If that isn’t working or you don’t have it, you wire the motor cumulatively, no exceptions.