Currently defenses in this game are broken too easily. You should be able to leave a hero in your castle to give buffs to your troops to make them more even with the attackers troops when he attacks your castle. I'd say keep it simple and just make it so you can leave one hero in your castle.
When he is in your castle you cannot use him at all until you take him out of the castle. Each time your castle is attacked it will take one stamina from the hero. It can be possible to injure the hero in the castle if you use any skills/spells that can kill the hero behind the castle, such as a rufio leap, ninja's etc. Giving a bit more diversity in gameplay and also giving some counter play to the addition of a hero to defenses. Also if two people attack your castle at the same time only one person will get the hero in their siege.
Examples of hero's
Yip - Will use cyclone when the enemy troops hit the castle wall for a certain amount of damage.
Avalon - Will fire volley when the enemy troops hit the castle / will give archers and humanoid troops more hp
Vega - Will cast favour of the sun god at the start of the battle.
Rufio - Will leap to the backline to commit suicide and give the enemy a morale boost once the enemy deals a certain amount of damage to the wall.
Virion - Gives troops a morale sheild / Legionaire troop buff / Will revive legionaires mid way through the battle.