I have made a few moons but never had this happen,
https://prnt.sc/sb1wno , till the other day. 2 Of my moons collided, right after making them (I guess it is a "random" chance) and for some reason it is not slow process like destroying any other station (ramming dunks or shooting gravity guns), it is instant destroying the smaller moon and badly damaging other moon. So there is no way to avoid this to happen, if they want to rob you, they will ( I already know it in rules they allowed to rob us) Also the debri from collision is "random" like out of the 16+million debri I could have got, I got 1 million. So loosing 1 moon sucks, however I just learned if a moon takes enough damage, you can't upgrade because upgrading will cause the structure to go into negative (since that makes so kind of fucked up sense? )
https://prnt.sc/sb1wfg. So after wasting tens of millions in resources, and also to add to it, I get to look even more stupid by rushing construction.
The Moral of story is, Do not upgrade damaged moons, most likely they will just disappear after upgrading. You got to either just let them sit there forever, or waste even more resources trying to blow it up for 1% of what you put into it.
https://xcraft.ru/forum/topic_47697