I recently had to wrestle with this in the design of my personal TTRPG ruleset.
There are a couple of approaches going back to things like BattleSystem for AD&D.
But my fun isn't in the top-down map of all the squads and such with the entire group of players driving one of the many units.
That just sounds like you should have been playing Warhammer instead of D&D.
Fundamentally - do you want to switch to an armies scale wargame to resolve the battle?
If so - what role do the players' characters play in that?
An alternate approach is to skip the wargame and use the war story as a backdrop for players' characters missions.
A massive battle of some kind let's you put a LOT (even overwhelming numbers) of choices in front of the group.
What do they choose to involve themselves in?
In my head, I try to think of cinematic examples like the Battle of Five Armies from the Hobbit, Napoleonic / American Revolution style battles ... but where do the characters fit in that?
The example that comes to my mind for this is Conner Macleod from the opening battle of Highlander.
Two armies rush towards each other - melee ensues across the field - then the camera/spotlight zooms up to Conner wandering around looking for someone to fight with and the guys next to him joking about "come fight by him" - and then then Kurgan arrives ...
That, to me, is an example of a specific focus on "the hero" in the middle of "the crazy confusing battle".
You can use the players' successes or setbacks to change the reported or perceived flow of the overall battle too.
A diplomatic, sabotage, or capture-the-general mission goes badly? The bad guy army makes progress...
Players pull off taking a general hostage? The bad guy army takes a setback...
Progress clocks can let you track the overall flow of the battle for both major sides and the first to get to the end of their clock "wins" the fight.
For each slice of your progress clock - key a story event or player mission.
Hope something in all of this helps or gives you ideas ...
Here's what I wrote up for my RPG:
https://armageddonmoon.com/salvage_space:mass_conflicts
MASS CONFLICTS
While rare, events may conspire to draw the Adventurers into a mass conflict as unwilling participants.
Or, the Adventurers may also choose to ally themselves with, join one or more sides involved in a mass conflict, or even instigate the mass conflict themselves in some way.
Mass conflicts include flash mobs, planned protests, or even outbreaks of war where the numbers of factions and combatants greatly exceed the size of the Adventurers' group.
Working alone or coordinating with others in these events, the Adventurers may choose to:
☐
WITHDRAW / ESCAPE
The Adventurers may have no stake in the events or conflict and simply seek to withdraw from the impending or erupting mass conflict.
☐
SCOUTING MISSIONS
The Adventurers may possess skills or abilities which aid collecting, relaying, or analyzing information or “intel” valuable to one or more factions party to the conflict.
☐
DIPLOMATIC MISSIONS
The Adventurers may open, carry, or contribute to diplomatic exchanges between factions of the conflict.
☐
SUBTERFUGE OPERATIONS
The Adventurers may act covertly to undermine, hinder, distract, or misdirect one or more factions in the conflict.
☐
SUPPORT / SUPPLY OPERATIONS
The Adventurers may provide support or supply operations in the face of and despite determined or hostile opposition, such as delivering critical supplies or search and rescue operations.
☐
SABOTAGE MISSIONS / BATTLES
The Adventurers may carry out harmful or destructive sabotage actions, assassinations, or join into battles against one or more of the factions in the conflict.