There exists a mighty stronghold on a bountiful greater demiplane. The only way in is through a permanent planar gate on the material plane, around which has been built a great and legendary door. During peacetime, it is open and unsealed for all to pass through.
From Create Demiplane, Greater:
Portal: Your demiplane gains a permanent gate to one location on another plane, which can only be used for planar travel. This location must be very familiar to you. This gate is always open and usable from both sides, but you can secure it using normal means (such as by building a door around it).
However, a great invasion is on the horizon. They will soon arrive to siege the stronghold and attempt to break down/through/into the gate. If the army is able to enter through the gate, the stronghold will surely fall, those inside will be destroyed, and it will usher in a new age of darkness, yadda yadda yadda. Assume the invaders cannot simply teleport into the stronghold, nor can they break in through any avenue other than this gate.
The stronghold has had sufficent warning to make any preparations they wish, and they will naturally seal the gate door shut with everything they have. The inhabitants of the stronghold have access to any non-mythic spell or class ability that can be used at level 20 or below, and unlimited funding. They can cast on either side of the door beforehand, but once the invasion arrives, they can only cast on their side of the door. They will not engage in open warfare.
How invulnerable can they make this gate door?
The siege has no particular time window or limit, so only effects with permanent duration or that can be refreshed from inside are worthy of consideration. The inhabitants of the stronghold are self-sufficient, and cannot be starved out.
Is it possible to hold this door forever against invaders with similar resources? If not, how long could the stronghold hold out? What level of invaders could be indefinitely repelled?
This answer suggests the hardness of an object can be permanently increased to an absurd degree if one is willing to sacrifice a lot of living creatures to it, using repeated castings of Death Knell and Hardening. It's a pretty evil thing to do, but maybe the door itself was built and hardened by some evil architects and plundered from its workshop by the forces of good. Notably though,
The hardening spell does not in any way affect resistance to other forms of transformation.
So I imagine there are plenty of ways to get around a door regardless of hardness. I'm looking for reliable non-time-limited countermeasures for such methods.
(Also, keep in mind that if the army of darkness should eventually decide to give up and goes home, the gate must be able to return to functional use.)