Self righting
With a low enough center of gravity (and maybe other mass distribution parameters are in play as well), the robot can self right by applying a step in torque signal.
First, some calculations should be done on what is the limit of mass distribution / length / motor torque. Motor torque can also be increased for a short time if the ESP32s DAC is used for stepper motor current control.