I believe it’s pretty much explicitly stated that Earth is in a reasonably good, or at least stable, condition, by the start of book 7, and wasn’t directly attacked, outside of some of the consciousness attacks by the “goths”, during the events of the final trilogy.
But, that might had also been depending on getting resources from the colonies, if not directly, indirectly.
Of course also, as others said, ~1000 years is a long time and it could had collapsed for reasons not directly related to the events of the books.