Hydraulic systems have very little "give", unless you put a hydraulic accumulator (an air tank with a fluid/air barrier) in the system. Electric motors have plenty of "give". Forcing a motor to turn backwards won't hurt it. The gear train is usually the weak point. As motors and controllers have improved, robot gear reduction ratios have decreased, which reduces the load on the gear train and lets the motor absorb shock loads. Direct drive robots eliminate the gear train entirely. Here's a nice one.[1] "You cannot strip the teeth of a magnetic field" - General Electric electric locomotive rep, around 1900.
With modern motors, you can get huge torque with light weight, and cooling becomes the limitation. Schaft used water-cooled motors in their direct-drive robot. Google bought Schaft, ran them into the ground and killed them.
[1] https://shop.directdrive.com/products/diablo-world-s-first-d...