I generally outnumber them so much, that heavy attack it the best way to go. That last series of hoard battles, I didn't lose a single guy.It's not fixed. So best thing I found was to test one, see how many soldiers you lose/how many you kill, then roll back & try the others.
Pick whichever loses you the least soldiers, in relation to how many of theirs you've killed.
e.g. Heavy Attack: Lost 2 soldiers, killed 22 enemies.
Skirmish: Lost 1 soldier, killed 13 enemies.
Defend: Lost 1 soldiers, killed 10 enemies.
Obviously "Skirmish" is the best choice, there.
If you lose 0 soldiers, go with the Heavy Attack to wipe out more of their forces.
The next round will be different, so repeat the process again & make sure you pick the one with the best win/loss ratio.
I have 300+ soldiers, so don't suffer defeats, but the process still works if you have less.
In fact, having less makes managing your losses carefully even more important!
Even if I lose a few guys, I usually take out a bunch of them, so typically worth it in terms of raw numbers.