Of course, the obvious answer for the long term is to build more mineral miner facilities (and/or more advanced miner facilities); maybe some robotoid factories or mineral scanners or something to increase production.

You might also want to consider building some mineral storage facilities, once you get back to having a surplus. Then you can survive a few turns of losing minerals...