It does work fine, I've done it multiple times.
You'll find depending on the troop there will be usually 3 exact values, you need to change all three, then do something with that troop, whether it's take a hit or hit something.
Most of my armies have 999999 troops of different types, archers are the best, have 2 different archer troops no one takes a hit..
I've been trying to change it on the map screen, not in combat, so that might be my issue. I'll try it in a battle. Thanks!