I think the basic problem with D&D mass combat is that the game is not designed with mass combat in mind and players do not build characters towards success in mass combat. Mass combat systems end up being a minigame that either ignores your characters' abilities or else repurpose a handful of them and semi-randomly reward characters for having features that the mass combat designer can think of reasons to make useful for mass combat. There's nothing wrong with a minigame per se, the trouble is that by the nature of what mass combat represents it is often a very consequential thing to have be decided by minigame the players aren't used to and haven't developed their characters towards. The alternative of not actually doing the mass combat and just using the big battle, siege, etc. as the backdrop for some decisive skirmishes by the PCs ends up usually being the better call because it keeps the important action within the normal scope of gameplay.
I don't think its impossible to have satisfying mass combat in a tabletop rpg that looks very much like Dungeons and Dragons. But the rules would have to be baked into the system and, more importantly, it would have to be a regular aspect of play that players build characters towards being effective at. A 5e variant with good mass combat would need spells, feats, skills, subclasses, etc. geared towards making characters more effective and providing interesting and creative options in the additional mass combat pillar of play, and campaigns would have to involve enough mass combat that people invested their character resources in all that.
You know, that's a really good point about character stats being mostly irrelevant (or only some characters' being relevant,) in mass combat.
I have no problem with it as a minigame. The point of it for me is as a way to allow players the option to do something different by taking control of mass battles, and really see how actual D&D combatants would fare in it. Being able to send your knights and dragons and against the opposing ogres and skeletons and get results in 3 hours that are a close approximation of what you would get if you sat down for 30 hours and played the battle with regular D&D rules is a highly desireable functionality. Obviously it involves changing what you are doing into a wargame at that point, and if people just aren't interested in doing that they won't get much out of it.
But I hadn't really thought of tying it more directly into PC abilities. Often, it seems like certain spells and features can give you extra options, but other classes have little to offer. What does a rogue have to offer as a commander that differs from a fighter?
While it's important to me that the results are similar to playing it out with regular D&D rules, I think I'm going to have to add in another consideration now: making sure different types of characters have unique ways of contributing to the results in both tactical and abstract scales.
I don't think it really needs to be baked into character builds, and it would have to be a pretty focused campaign for that to be a worthwhile expenditure. Instead, I think it will be worth examining the kinds of features that already come with classes and and races and subclasses.
For instance, at the abstract scale having certain features or minimum skill bonuses or feats might let you be better at improving troop morale or leading scouting missions, or constructing siege equipment. I just have to look into all the various sorts of things that could help those types of activities, and make lists that ensure most characters will have one or more things they are particularly good at.
It's much trickier when your are at the tactical level leading units, but in that case it's probably going to be helpful to take some characters' and run some mock battles between units to see how characters with various features can really leverage them in that situation in a way they wouldn't in standard D&D combat situations. I'm optimistic that I can find some cool possibilities.