Heroes when defending
When being attacked, you rarely know which troops are coming for you until the march starts, and because there isn't a "quick swap" for stationed heroes, your best shot is probably to go for a mixed set of heroes on your wall.
You can station up to 5 heroes on your wall, so let's pick up one INF ATK hero, one RNG ATK hero, one CAV ATK hero and 2 ARMY ATK heroes from the lists the available F2P heroes.
Stationed heroes
- Rose Knight (CAV hero): brings ARMY ATK (and CAV HP)
- Bombin' Goblin (RNG hero): brings ARMY ATK
- Child of Light: CAV hero, brings CAV ATK and CAV HP
- Snow Queen: RNG hero, brings RNG ATK and RNG HP
- Then either Demon Slayer: INF hero, brings INF ATK and INF HP
- Or Oath Keeper: INF hero too, brings INF ATK and INF HP too
Additional notes
Leader
You leader will need to be stationed on the wall, meaning one of the above heroes will need to be your leader.
As already explained by the selections of heroes when attacking, Rose Knight or Bombin' Goblin are good candidates for being your leader, plus they both are in the list above.
DEF
It's not because you're defending against an attack that you need to maximise the DEF of your troops.
DEF is more or less useless in Lords Mobile, only ATK and HP have a significant impact on the outcome of a battle. HP is particularly interesting to increase when defending an attack, so that your morale doesn't drop too quickly. ATK is always worth being maximised when fighting.
Event and P2P heroes
If you have event or P2P heroes, you can obviously use them instead of the ones listed above, just make sure you end up with a balanced set of heroes so that you don't end up too weak against a specific troop type (unless you have smarter plans).