It depends, if you play very defensive and are turtling and you have 10 garrisoned buildings, then.. yeah, it will be a lot of micromanaging. But most players don't play very defensive and most of the time have 2 maybe 3 buildings with a few units garrisoned, these buildings will most likely be in areas they need to pay attention to anyways. Plus, even if they lose these units due to the buildings getting destroyed in most cases they would have lost those units anyway. And it's just a few units and not a game changing loss.
Of course, every time you destroy one of your buildings yourself all garrisoned units inside that building should automatically ungarrison so you don't accidentally kill your own units by deleting buildings.
As I said, this feature won't make catapults overpowered and would just be a small advantage for catapult civs. And most catapult civs (like Athenians, Carthaginians) are one of the worse and less used civs anyway.
How about a research technology that reduces the damage taken by garrisoned units from the building getting damaged?
Also, garrisoned units get healed, so when a building gets damaged but not destroyed the garrisoned units will get damaged but regenerate back to full health over time.