Trade-based caps would be nice, also Militia should be based on what types of weapons, armor, etc. the locals would have.
If the locals had the stuff militia does and were as tough- no town could ever be taken in the first place.
As for time windows, make them charisma/luck based- random 1-3 hours plus random 1- to charisma plus luck hours. Stats are from the one who talks to the TC guy.
Maybe add minutes equal to speech plus barter on top of that.
Window extended by 1 hour per militia purchased plus 2 hours per merc added to the militia.
Defense forces would have to be provisioned with armor, weapons, ammo, and healing supplies.
Not sure about window extensions.
Maybe you have to defeat the militia/etc. to retake town after the window runs out unless you wish to keep adding mercs to the militia.
So the longer you keep the town the stronger it gets. Just don't let the window close or they decide they don't need you any more and will be really tough to retake.