My last campaign that I run, that lasted for 4 years, had an impending war (at the beginning) and a hot war (in the later game) as a the backstory. The evil Guild lf Neymon wants to control (aka enslave everything magical) all magic (in order to stop the ascent of a great old one, an even bigger evil) while the more magical races opposed the guild (and they didn't know that the God's they pray to are actually deciples of the great old one).
I ran 3 big scale battles with my group.
5 level 5 PCs (and some low level NPCs) vs 1000 Zombies, 2 Zombie T-Rex and 2 Homebrew weak liches
The first was a village defense before the actual war started. Some evil Archaeologist from the Guild of Neymkn accidently unleashed a Zombie plague, threatening to overrun a village the characters saved twice before. A 1000 Zombies, controlled by two minor liches (homebrew weak liches) and accompanied by two zombie T-Rexs and a young skeletal dragon (we need siege engines) where about to attack the fortified village. My PCs were level 4 or 5 at that time.
So they were to be teleported to the village to act as first responders and hold the walls long enough before reinforcements from the Order of the Moon (one of the opposing Kingdom's to the Guild of Neymon) would arrive.
So, what was the objective? Hold the Village for ten battle rounds before the cavalry arrives (via Wizards who would would teleport to the village, bringing mobile teleportaion circles for the bulk of a small army to step trough).
How did I organise this mass battle?
I put walls between the mass of the Zombies and Player Characters. The players would attack from behind the wall. Using stuff like Fireball (so they must have been level 5) and other ranged attacks to decimate the attackers, a cleric who uses turn undead with a pimped medaillon to increase the range, a Bard who uses Spells to make the T-Rex stomp over the Zombie horde and so on.
So on Zombie T-Rex would spit Zombies over the wall, while the Skeletal Dragon would be used as a kind of ladder to get over the Wall. Also the Zombies would slowy destroy the walls. So some Zombies would get into the village, but I didn't need to controll more than like 10 enemy creatures at the same time in a round.
The liches stayed back and controlled the hordes, barley interacting with the actual fight.
I expected my players to just barley hold the walls, but players be players. They used their air superiority (they had a small inbreed Dragon they freed from Neymon as a mount and Companion and a Druid I let get away with summoning animals he could pick) to go for the Liches, because they where the obvious command structure and priority targets. So the UA Psionic and a Druid riding on their dragon are attacking the first lich, while the Bard, Monk and Cleric are holding the village and rallying the villagers (who are helping with defending). And they are able to kill the first lich (which is not to hard, that's why they are at the back, having a thousand Zombies between them and the PCs), nearly half the Zombies die. So when they figure out that killing the lich kills most of the Zombies, the monk gets onto the dragon, too and let's himself get catapulted at the other Lich. He kills him, before he gets offed by the remains Zombies outside the wall.
So, after resolving the threat, the cavalry arrived and revivivied the monk.
And that's the Tale on how my Players defeated 1000 Zombies, 2 Zombie T Rex and 2 Minor Liches while being Level 5.
The battle took 8 hours and while we all agreed that was cool, nobody wanted to repeat it that way.
So the Next big battle had to go different.
The siege of Nightcity
After doing a ritual to restore a god who had split herself into 5 parts in order to protect the Night Island from the Guild of Neymon 100 years ago, the god gets killed by an assassin, leaving the Night Island unprotected from an amphibian invasion force of Neymon.
The PCs where now 8th Level and after the ritual all had a godly spark in them. They where at the temple where the Ritual was held, when they saw that the fog, that protected the Island was gone and a Kraken would arise, while Mermen came from the sea to invade the city.
The 4 former carriers of the souls of the god (Mother Night), weekend by the loss of the Godly touch, said they will fight one last time to stop the kraken. But the Player Characters have to defend the city and rally the defenders.
The defenders were more or less prepared. The enmassed a fleet of Vistani Ships in the harbor (who were sworn to serve the god) who went out in a brave attempt to meet the Kraken.
Leaving the Player Characters to organise the defence of the city.
Here I did the spotlight thing. From the Landside two Gates were attacked by agents of Neymon who had infiltrated the Island beforehand. So the party split (the Monk Player couldn't come so he went to one gate while the rest went to another) so we had short fights their to repell the attacks and then we zoomed out and I let the players make decisions on how they wanted to organise the city defenses on a city scale level and what they are going to do. So no detailed fighting and more "I fly over here and drop Psi-Bombs in the attackers their" and "I will go trough the sewers where to rally the intelligent animals there to help with the attack" "I summon our Goblin Allies with the sending stone from the other side of the Island" "I try to organise the south flank to repell the attacks" and have them make appropriate skill checks to do that.
Our Cleric picked up an army of Child Magicians (who were trained as Child Soldiers on the Island) and they could stabilise and repell the amphibian attack, using up a lot of spells and class ressources.
But there was still the Kraken who had destroyed most of the Vistani Fleet ... so my PCs decided to take on a Kraken (my plan was actually for them to wait for the cavalry to arrive, the combined fleet of the order of the Moon and the Goblins of the North who are led by a God-Dragon) but players be players and if they see a kraken they will go and fight the kraken.
So they took their ship, loaded their Child magic soldiers onto the boat and went for to kraken. Their was one Vistani Ship still fighting, but in retreat (which was command by an NPC the PCs liked and who may or may not be the half sister of the Psion, so personal stakes and all!) which also had the 4 now dead former protectors of the city on board.
So the players engage the Kraken and open that part of the fight with a volley of fireballs from their child army. Which hurts the kraken, but didn't kill it. And whom retailliated by attacking the ship with its lightning ability ... killing most of the kids ( don't worry, they were revived later, I'm not that cruel, but it was very traumatsing for the characters who thought it was a good idea to bring Child magicians to a Kraken fight).
One of the players used also a magic item to open a portal to the allied Fleet that was about to arrive, allowing the Goblin Air Force to attack the Kraken, weakening it further.
So, that was then a pretty standard fight afterwards with the Kraken getting killed I think by a firebolt or something simple at the end.
So, that fight took about 4 to 5 hours. The scale was even bigger than the first one but we could do it way quicker and every character and player felt that they contributed in a meaningful way.
It was fun but also something that shouldn't happen to often.
So of course I planned the next big battle right for the climax of the next adventure ...
Battle for the Feywild
So, you actual plan was to get my Player Characters go into the feywild to rescue their friend (the Fey Warlock who was "rescued" by their patron some time ago, who was replaced by the bard) who now was (unhappily) married with child to a fey lord (Idea of the player). But the feywild was falling to corruption.
Long story short, the former wife of the feylord was turned into something evil and corruptive and the feylord couldn't get himself to kill her and succumbing to her thrall. His plan was to sacrifice his child to her when the child was strong enough in the hopes that will free her (his reason why he married the Warlock jn the first place). So he sabotaged any attempts to root out the corruption of the feywild while still maintaining the facade of fighting it.
But slowly he had send most of his troops in to be succumbed by the corruption, too ... they where some other feylords working against him, thinking him a bad leader (but not knowing of his betrayel yet) and trying to rescue some of the troops and recruit more own ...
So, then the players arrived. Thinking ot would be an easy task. Just go the root of the corruption, kill it, save the feywild and take the Warlock back home.
They are lucky they didn't do that, because they would have run into an Ambush and probably killed. But they figured out that the Feylord was playing a false game (with Drugs and Psychotherapy during a party) getting to know the whole backstory. They can break the charm the ExWife has on the Feylord. In order to not make it worse, he gifts his free will to the Warlock who know controlls the fey wild.
So, now they are amassing an army with the help of the other feylady who had hodden awat troops in order to root out the corruption.
The plan that was now done was sime: The army was the decoy, luring away most of the defenders from the heart of the corruption while the PCs while fly to the root of the corruption and end it ones and for All.
So the big battle of the armies was bow off screen. The PCs only prepared them. Like the Monk training the Harefolk to fight, making them into a shin Breckerfeld brigade, the Warlock organising the food an army needs for travel and so on.
So when the real battle began, the PCs would leave and sneak/fly around to the heart of the corruption and have a normal D&D battle without having to play out the big battle between the armies.
That's how I handled big battles in my campaign.