Terraforming is pointless anyway. Space-based habitats are a much more efficient way to expand our living space, and most importantly, when living in one, you don't need to live at the bottom of a gravity well.
To paraphrase someone else, when planet-bound civilizations fall to barbarism, people revert to agrarian societies; when space-based habitats fall to barbarism, everybody dies.
The difference being that maintaining a habitat takes a lot of technology that is constantly kept in working order.
When a planet-bound civilization at our level or above falls to barbarism, almost everyone dies. The planet simply cannot maintain billions of people without pretty advanced technology.
In the end, that last % is probably not that significant, specifically because space-based habitats have a very strong advantage over planets -- planets are much rarer. The solar system can sustain many millions of space stations with >1M pop each, with cheap travel between them. I'd estimate that complete system-wide reversal to barbarism is pretty damn rare in that situation.
Modern farming is also a high tech field, most people will die anyway when you revert to agrarian societies. Once you've spread across multiple planets you're no longer at (significant) risk of extinction, so the effect is pretty much the same.
The difference being that maintaining a habitat takes a lot of technology that is constantly kept in working order.