Thats a decent way in boosting usage of fort.
But I still don't think that forts are historically solidifying border loyalties. They prevent enemies from outside, but not the unrest within the cities.
The encampment is surely a better representation of linkage between military and loyalty. It is the place where troops are trained from and settled. If anything about military loyalty is addressed, it should go to the encampment first.
Therefore, a walling effect will be better.
Castles. Feudalism. Scotland. England. France. Germany. Christianisation of Poland and Lithuania.
Forts (and Civ6's early forts are field castles, make no mistake) can be abstracted as local baronies fairly easily.
Forts were *always* used to lock down local loyalty.
Edit: I'm not saying the encampment isn't a BETTER choice. I'm saying this is a good GAME choice because it takes an improvement that currently has less than zero value and suddenly makes it VERY valuable.
Encampments are already extremely valuable with housing and production buffs, arguably one of the most valuable (if not THE most valuable, depending on who you're playing) districts in the game.
Forts are currently useless.
With this change, with a +2 loyalty bonus for garrisoned forts within city radius, you immediately go from "nobody ever builds forts" to "forts are limited to not more than 2 per city" capped because otherwise there would be an actual strategy of building a dozen military engineers and following your army and building a bajillion forts along the way.