You did set static ip in the Pi and dedicated ip in the router, correct?
Check the router log for events with the MAC address.
Did you try a stretch Os and don’t do an update? There may be some weird things from the 4.19 kernel.
Understandably impossible for the "keeping its head up" function, but can it provide accurate (world frame: x, y, theta)? It's a serious question. Am I wrong about that application of IMU?