it s an extreme measure, i love my forts
(well, except a few ones, i use them just to waste money when it pile up [and no, i don t like to give it for free to papal state, not even in game
] ), and the most of the time AI build forts to leave them the next turn: never happened in my games an AI fort with a long term garrison.
about AI's city garrisons, i'm working on them (till now with no success, but i am beaten yet not still defeated). The simplier way would be a spawntroops script such garrison script whom works just when the attacker is a local foction... but i'd rather find a more elegant solution