For safety, I'd not build it aimed directly at Earth, but require some trajectory corrections not to miss the planet. Otherwise it's just a weapon.
Everything that is in space and big enough and can be roughly guided, can be a devastating weapon.
Which is why I love the idea of peaceful space exploration and am not so happy about the latest developements to arm the space again.
When it's guided, you may be able to see it coming, see the jets for changing trajectory, and it can evade an impactor designed to turn it into a lot of smaller pieces that will burn up in the atmosphere. If it's just a rock covered in F22 paint it'll be a lot harder to see before it hits.
https://en.wikipedia.org/wiki/Mass_driver
First time I heard about it was in:
https://en.wikipedia.org/wiki/The_High_Frontier:_Human_Colon...
There is also an amazing English translation, and a blog on how it was done: https://lparchive.org/Policenauts/Update%2042/
Unless you are talking about launching it at lunar escape velocity directly at earth orbit.