

This is basically what they did in feudal Japan.
Like, a potential rival that lives near your capital, is given the opportunity to pay for the development of a massive wall to protect it, along with bragging rights that they’re powerful enough to help the city, and that they have close ties with leadership as an ally
This drains them of capital they could use to raise an army, and also installs a big fortification that makes it harder to attack.


It still is if you’re willing to jump through enough hoops