There's always been a fascinating link between wargames and RPGs. Pragmatically, though, there's a significant intersection. While RPGs normally feature small skirmishes between 6 to maybe 12 creatures, sometimes the combats get significantly larger. Strangely, the world's first RPG was created specifically to scale down the wargame experience, and yet sometimes the RPG battlefield starts to get pretty crowded. Here are X tips
== 1. Wargame minigame
At the time of this writing, nobody outside of Wizards of the Coast has seen the upcoming 5e Dragonlance product. I have mine on pre-order, so I'm meant to get an early-ish copy (although shipping to New Zealand could affect that in some interesting ways.) There's a literal board game included with it, though, so from the looks of it, there's essentially a wargame included with the book.
Even if that's not the nature of the product and the board game is just a board game (admittedly, it doesn't look like there are near enough miniatures for it to be a wargame), the idea could be an intriguing one, at least if your gaming group is interested in wargaming. Not all are, and as with spaceship combat in Starfinder, it can be dangerous to impose a shift in your game system when everyone at the table thought they were signing up for a regular old RPG.
However, if your group is keen, then there are lots of great indie wargame rulesets out there. When the big battle breaks out, you could have a minigame in which players go up against the Dungeon Master in a literal wargame.
== 2. Source books
I haven't read them yet so I can't definitively recommend them, but there are a few books out there that contain rulesets for mimicking large-scale battles within D&D.
== 3. Hide the battle
First of all, a "big" battle never starts with the boss. Don't drop the player characters into the boss's office for the final showdown, make them fight their way there. It doesn't always have to be combat. There can be stealthy ways to "fight" their way to the boss's lair, or social intrigue ways to be escorted there under false pretenses. But that final journey toward the boss should feel like a deadman's walk. Complications, anxiety, or just regular combat against hordes of minions, make the players earn their way into an audience with their target.
The battle must be big, because it took a long time to get to the actual battle.
== 4. Add complexity
A "big" battle doesn't necessarily have to by "physically" larger than any other battle to feel big. It's all imaginary, so sometimes the important thing is to give the impression that there's a big battle raging on around the player characters, even though the players themselves are focusing on just the boss battle. Movies have done this for ages. We follow the hero to subdue the boss, and once the boss is vanquished, the whole army scatters (and usually the castle just crumbles so we don't even have to worry about cleanup.)
You can give a sense of scale by adding effects that intrude upon the immediate combat. A stray boulder, thrown by a giant with bad aim from 100 feet away, wasn't intended for the players but it imposes a Dexterity save nevertheless. Dire environmental effects are ever-present because you're on a battlefield, and probably on the home turf of your enemy.
More problems, more bad things, more environmental hazards, more random acts of damage. This can require some pretty arduous management of combat With large scale warfare, you need to consolidate bookkeeping, or else every single turn becomes a minigame. Here are few ideas on minimizing the burden of each turn:
Getting incidental effects out of the way up front can you help focus on the moving pieces.
== 5. Swarms of minions
On page 250 of the 5e DMG, there are rules for mob attacks. It's essentially THAC0 for massive combat.
Say you have a target you want to hit. The target's AC is 22. The monster you're attacking with has a +5 bonus to hit, so you need to roll a 17 (17 + 5 = 22) in order to hit.
That's pretty standard D&D logic. Here comes the math, but you can ignore the math and just follow the table if you want.
If you throw one of those monsters at your player, then you have a 20% chance to hit (because you hit on a roll of 17, 18, 19, or 20, and there's a 5% chance any given side of a d20.) Good for the player, not great for you.
According to the chart on page 250, though, when you attack with a cluster of 5 of those monsters, then you can confidently say that there's a 100% chance that one of them hits.
It makes sense if you think about it. 20% to hit × 5 monsters = 100% to hit.
Said another way, 100% desired chance ÷ 20% opportunity = 5 monsters.
The same math dictates that if you need to roll a 19 to hit, then you have a 10% chance to hit (because you hit on 19 or 20, and each number represents a 5% increment on the d20.) 100% desired chance ÷ 10% opportunity = 10 monsters.
Whether you connect with the math of that example or you just follow the chart, the same principle applies across any game system. If you can figure out the current opportunity you have to hit, then you can divide 100 (your desired state) by that number to get the number of attempts you need to guarantee a hit.
Obviously it's impractical to enter 30 or 40 minions into your initiative tracker. You aren't meant to, either. Instead, you're creating swarms of baddies, and you can treat them as such. Players don't target a specific creature, and instead choose to either attack "everybody" or "just the boss". D&D 4th edition established a nice rule that had minions set at lower HP, which gives players the sense that they're actually chipping away at the hordes of foes, so announce kills either any time someone hits the swarm, or at least whenever there's a hit that rolled high.
Big battles can be difficult to run, but to be fair I don't believe they're meant to happen often. The big battle is likely to be the endgame, so put in a little more prep work than usual, monitor the flow of the encounter, and get your players across the finish line.