I would do something entirely different
I'd get rid of groups of units entirely.
Instead- I'd make stack limits based on a few factors
Towns- no stack limit. You want to turtle up 100 units in your capital, go ahead. Your economy will suffer.
Stack limits would be based on a few factors (logistics code has to be in the game somewhere, I'm sure, if not SD knows how to do logistics
a) Base value, which is determined by techs. The grouping techs now would add to the base stack limits
Heroes would not count in stack limits at all, and adventurers and commanders would raise stacking limits based on their char value. Hero bonuses would be additive, so 2 heroes would equal a much larger stack. Other hero types such as the farmers/scholars/sages/adminstrators/royalty, would not raise the stacking value, but still would nto count. Sovereigns and their family would always count as adventurers.
c) Some traits added, such as commander, and a unique building would also provide a bonus.
d) Some units, such as dragons would take multiple slots. Those heroes/adventurers/commanders with the beastmaster trait (another addition I'd add, traits to give units modifiers) would negate/reduce this penalty.
e) From the adventure tree, an Adventurer's Guild building would be added, which would give a chance of popping out adventurers. Command posts would have a possibility of popping out commanders.