Saeviomagy
Adventurer
Sure, if your contingent of guards stationed at your heavily used teleportation circle don't count as surprised...Let's say I accepted all your assertions on how many people you can get through a circle in 6 seconds. Wouldn't that just make them more likely to be epic slaughtered in seconds.
I feel like this is just being contrary.If while hustling you can fit 4 people to a 5'square how many can fit when jam packed into nearest unoccupied space? You could probably wipe out all 384 with a single fireball. They wouldn't be appearing outside the ring they'd be crammed in to their own doom. and if we are going with realistic when at a hustle your distance between friends gap suddenly narrows to virtually nothing are they bumping into each orher, tripping and falling. It would be the keystone cop invasion.
And you've given tons of advanced warning because you've been visible the whole way, plus it took you days to travel the required distance from <place where an army is not considered a threat to our city>.Similarly though if the world is populated with coordinated guys getting themselves through a circle in 6 seconds dropping a dozen gang planks and unloading the same number of men from a boat should take the same time. Either you can train people for maneuvers where they move in perfect unison in tight formation or you can't. Private sanctum on a boat so it's only visual tells that reveal. Unload a mile or 2 out of town in apparently 6 seconds per 300+ troops and march into town before they can respond.
A mundane force of footsoldiers can be opposed by another mundane force of footsoldiers, and if you're defending a city, the defender generally has a significant advantage.
But some demons and undead are really hard to stop with just mundane forces.
On the low-CR end, barlgura and quasits can become invisible, shadow demons can pass through walls and are stealthy, wraiths can go through walls and animate their victims as spectres
And high-CR demons can teleport, and mummy lords and liches are totally immune to mundane weapons!
Sure, but it's probably a lot easier to find enough troops to defend your city against a 2000-man army than to find a party of adventurers high enough level to deal with a nalfeshnee, marilith, balor, mummy lord, or lich. 13th+ level people just aren't that common.
The fact that you have a civilization would suggest that they are common enough.
In a high-magic world, I don't think you'd have city walls, just as modern cities don't.
If there are enough wizards capable of casting teleportation circle to make permanent teleportation circles important to trade (which implies a very-high-magic world with lots of high-level spellcasters), then war is going to be dominated by high-level characters and powerful monsters, not medieval-style closely-packed armies that are highly vulnerable to area effects.
The thing is that a wizard capable of casting teleportation circle 1/day is only 9th level. He's likely to die a grisly death if he faces up to even 100 soldiers unless they're obliging enough to stand in a 20ft circle for him.