Let's talk about hero ability scores.

Each hero has four primary abilities: Offense, Defense, Focus, and Intellect. Offense and Defense, also known as Might skills, are added to corresponding abilities of the creatures. Focus determines power of the spells cast by the hero, be it damage, duration of status effect, or something else. Intellect determines how many mana points a hero has at a maximum. These two are called, unsurprisingly, Magic skills.

The idea is to go back to HoMM II ideas of having one type of hero per faction, which means factions will be more or less specialized in one of the two sets of skills. This can cause problems.

A Barbarian with a full week's worth of units should be able to stand his own against a Wizard with week's units and her powerful spells. Now imagine the same Wizard's clone with a week's worth of Barbarian units. Greatly more powerful. On the other hand, a Barbarian commanding Knight units will get more damage out of them than a Knight ever could.

This can be solved by abusing synergy, making Barbarian creatures weak on their own and relying on the hero's Offense and Defense, but you can probably already tell what I think of that solution.

All factions' units can be made balanced overall, with assumption that the same hero is running both armies. This isn't great either, as it makes the factions less distinct. After all, it only makes sense for Barbarian creatures to have better Offense than Wizard creatures.

Instead, I suggest strengthening synergy between hero and creatures of the same faction, and impairing it when factions differ. Normally, creatures under command of a hero of different faction would get a Morale and Offense/Defense hit. High Focus will help with control of Might creatures, reducing the penalty, and high Intellect will do the same for Magic creatures. (By the way, when I say "Might / Magic creatures" I don't mean the faction they belong to. That distinction is decided case-by-case.)

I know what you're thinking. Yes, that still leaves Wizards (who will have high Focus and Intellect) able to command basically any army. My reasoning is this: Might heroes are good on their own, and as such are a greater threat to the overall balance. Magic heroes, however, require Magic Guilds to equip them with spells in the first place, which a Barbarian player that hires a Wizard hero will be hard-pressed to find.