From experience, high level fighters can cut a swath through armies but suffer for it. Yes, they only take damage on nat 20s but that builds up over time. You don't need epic armies to challenge epic characters. Actual armies, leavened with a small number of lower level casters, are just fine.
Let's look at a high level fighter who teleports or uses stealth/invisibility to pop up at point blank range. Facing duel-weilding orcs who mostly have advantage via flanking and assuming 5 in range at any time, the PC get hit for an average 9.5hp every round and lets say they kill 4 foes a round. After a 30-round slog (3 minutes) they have killed 120 enemies each and have also suffered 285hp of damage.
That sounds amazing, and it is. Only this is an army, not a single unit. There are 5,000-15,000 troops. They take up acres of space, if not square miles of land. These arent even mythical armies. Ceasar had more than 30,000 actual soldiers in the field in Gaul, not counting the vast numbers of support troops. Alexander had similar sized forces under his command. Legendary armies (meaning both size and improbaibility) would be Xerxes army, which according to the hyperbolic histories had an army 800,000 - 4,000,000 strong
Yes, casters can kill more if they nova thanks to AoE spells. Let's say a caster can kill 10 common troops per spell level for spells 3rd level and up. That's still less than a thousand soldiers killed by a 20th level caster who lobs nearly 20 spells.
Yes, there are a handful of specific spells that can be very impactful over very large areas but but most of those are sustained and can be dispelled (Mirage Arcana, control weather, control water, earthquake etc)
I have seen this in play. In the 3e campaign I ran, a 19th-ish level monk ghosted into a goblin army, issue a verrry long winded threat to the goblin king that let the lieutenants form up the troops outside (the monk heard the war drums but ignored them). He dashed out at speed...and had several volleys of arrows and javelins lobbed by hundreds of goblins, all aimed just at him. 1/400 odds of success seems awesome except when 500+ attacks are made per round and every hit is a crit, because those are the only ones that can hit, the pain adds up. Add a few low level shamans throwing faerie fire at the monk and bless on the elite archers and those odds can get a lot closer to 1/20. (Or whatever the 3e equivalent was. There was a bardic drummer ot two giving boosts to the whole army)
He finally got out of range with 18hp. (no, I didnt roll a million dice, just a bit of envelope math and descriptions. "You get to run in the shade as the arrows blot out the sun.....") On the plus side, he put a dent in the army's confidence and arrow supply, but he also caused the high level shaman to prep spells like creeping doom and implosion.
In these scenarios the high level characters are not intended to defeat the army by main force, but through high level stratagem. Demoralizing troops, destroying supplies, creating delays, taking hostages, etc. Yes, they can defeat them by force over a week or three, but how much damage do they do in the interim? How many cities are burned? How much of the harvest will be lost, leading to starvation all winter?
This is often the basis of high level play. Singular opponents are distinctively rare, large groups of foes should be the norm.
When they do decide to hit an army head on, I recommend not using minis for minor troops and instead go with candy. M&Ms for armored troops, jelly beans for softer targets, add some pretzels for larger foes, etc. Make combats actually crunchy/salty/sweet. Let them enjoy cutting a swath of statistical cut scene mayhem before hitting the ring wraiths or giants or whatever that is the real threat.