Auto-translated
Capturing a Castle is not a condition for victory – that is true. The developers specifically protected the player from this "randomness" by placing a strong garrison. But, since there are no more interesting battles left for you in the Campaign, I suggested it as an option. The possibility of capturing a city is nothing more than a check to see if you have done everything correctly: leveled up your hero, chosen and used magic in battle. "Dark" magic might help, however, there are dragons in the garrison, and there are many of them, so you shouldn't forget about them. They are the ones that make the battle for the garrison difficult. Without them, this battle would be at the "warrior" level. And regarding the topic of "template" – capturing a Castle is not described even once, while the Campaign Walkthrough is broken down into all its components. There is room for Creation here.
Added 3 minutes later
I have never leveled up an Orc anti-mage, I think. In principle, in the Orc Campaign, they don't often cast spells against us, even on the warrior