if somethign with enough emergy to do this sort of damage is heading towards the planit undetected, whats to stop the next one beign in a less sparcely populated area.
Because the Ancients took every known object in the Solar System larger than 10 cm and plotted the possible trajectories, including impact points on the Earth, through AD 2999. They then encoded that information into human DNA, so that humans would subconsciously avoid development in areas that would be hit by large objects some day.
A pretty impressive feat, considering that they didn't have supercomputers back then and had to do all the calculations using just their fingers. Fortunately, the Ancients had 20 fingers on each hand, which helped immensely with the calculations. Unfortunately, Groke, one of the Ancients involved in this project, had an unfortunate accident and had to have one of his fingers amputated, which led to the "Y3K problem" and prevented the calculations from going beyond AD 2999. (Legend has it that the "accident" was really from Groke's 3rd wife finding out about an affair Groke had with another member of the project, but this was never substantiated by any of the parties involved.)