The question really depends on the kind of motor used. The two real categories are brushed and brushless.
Brushless motors (induction and BLDC) are very difficult to damage with and over torque or stall condition. If a brushless motor has sufficient cooling it can remain stalled indefinitely.
Brushed motors are the ones that are easily damaged by an over torque or stall condition. The resistance of rotor in a brushed motor is a sum of the actual resistance and the back emf. The back emf increases with the speed of the rotor. As the motor slows down the back emf resistance becomes less and less dominant. This drop in resistance increases the current through the rotor. This extra current generates more heat. If the motor has sufficient cooling and the current is within the limits of the brushes the motor will tolerate it. As the motor slows down further there will be a tipping point where the back emf resistance is so low that the current through the rotor is too much. This current makes more heat than a cooling system can reject and overloads the brushes. When the motor stalls only the resistance of the rotor is left which is normally less then 10 ohms of effectively a short and bad things will happen.
With brushed motors, normally and over current condition signifies overloading and trips some type of shut down to protect the motor.
If lifting a load overhead then there should be a mechanism is place that can hold the load without intervention of the motor. All commercial cranes and lifts have electro-magnetic brakes that engage when the motor stops or power is lost.
To protect the motor the terminals of the motor can be shorted together. This effectively forms a brake. As the motor spins it will generate a potential, that potential is fed back into the motor but in a reverse direction to the spinning. This braking action can slow the motor down to a low speed but never to a complete stop. A good H-Bridge motor controller will have this feature. After a safety shut down engage the brake.