Also, recall from freshman physics that the pendulum problem is non-linear. Most balancing robots linearize the problem around the stable point. Which means if the robot gets far away from the equilibrium point, you either have to switch to a different controller or live with the consequences. One of the consequences is the robot racing off to the horizon as it tries to get the wheels under the CG again. (Which may happen anyway whether or not you switch controllers.)
Thus, my standard advice to all newbie robot builders: Your first robot should have a low enough mass that a missing semicolon will not punch a hole in your living room wall.
If this kind of thing is interesting to you, MIT 6.832 Underactuated Robotics by Russ Tedrake is posted on YouTube going a few years back, and the Spring 2019 version is being live-streamed every Tuesday and Thursday, picking up again next Tuesday after spring break.
Static doesn't necessarily mean safer. But the article also notes these aren't intended to share space with humans yet.