,
Virtually every army uses the cannon line as it's backbone from EA on. The only units the castle is actually effective against are planes and sabotuers. If you use a bunch of archer or heavy infantry losing 1 or 2 to it before it goes down doesn't change anything. Heavy cav don't take anywhere near enough damage from it to do anything but shrug and keep plowing through a base. My point remains, it's a pedestal for generals.
So I think one of the main things that is missing from your consideration is that it's not like I attack the castle and the battle is over. Typically there is a trade off, I've taken time to attack the castle, set up my cannon line, and destroyed it without your generals spawning. Okay, but so what? If you've set up your defenses in any kind of organized fashion, which in assuming you have, then what have I given your defenses time to do? Spawn more troops and begin to surround me I would assume. The truly best defense minded players know that there is no such thing as an impenetrable fortress, however there are ones that make you take time.
See that's the key, okay your castle may have flaws that can be exploited, but if properly placed, it could add x amount of time to my overall attack, which can amount to the exact same thing as wiping out my force.
I would like to add as a footnote for those who used history as a part of their explanation;
Cannon, Ballista and Catapults were specifically created
because they could stay outside of the range of a castles archers and defenders. That is specifically why anti-siege units were invented. Those siege engines should have greater range than the castle because they were designed that way. Why would a weapons engineer design am expensive and time consuming weapon of wall breaking destruction, only to have it so that archers could take out? They wouldn't, no military leader would have used them with such a glaring weakness.
Now I would somewhat agree that there could be 2 triggers, one for the area off defense, where units are vulnerable to attacks from the castle, and then a larger radius for castle defenders to begin spawning.