Auto-translated
The fact that he wasn't standing in the castle is actually very correct.
I think you just haven't seen an elf taking a castle before. Sometimes, before you even have time to react, a swarm of fighters + flies + dancers, teleported over the fence, destroys everything. Here, armies usually focus on killing archers and druids. At the same time, flies and fighters reach the army standing behind the fence from the first turn, even without any tactics.
The main advantage of the elf is in the first strike. And it's quite difficult to manage to strike first against an elf. You need to somehow get out of the castle first. And logs, and usually horses, simply don't even get to them in the game.
As for the fact that he lost the hero, I think he was just behind in development. Although Dugal was quite strong in terms of level. I still don't understand how he leveled up so quickly - and I was running with the experience log, the path of war, and at the end, even with boots. And most importantly, there weren't that many battles - but the levels were the same.