Even without self-replicating automata, each cosmic body capable of threat could be safely parked near a designated family of orbits; such a scenario is described, passim, in The Mote in God's Eye by Niven & Pournelle, where Moties are locked in endless wheel of aspiring civilizations, wars, and catastrophic collapses. It took them a good million of years to transfer all the asteroids and Oort cloud-type icy bodies, but they completed the project through great hundreds of iterations, lest the Mote Prime planet be destroyed in repeating kinetic bombardments during civil wars.