Nuke them from orbit. It is the only way to be sure.So, damn, what do you do? I believe now the PCs should have been 9 or 10th level before this battle, my bad on that part. Too late now to correct. It's game on and if I play the Boss intelligently, it knows it's winning and simply has to spam Toll the Dead until everyone is dead. Looking for ways to throw in some (believable) chances for the PCs rather than mercilessly mow them down. Also, on a tangent, may approach the group again about limiting the # of attack cantrips one can cast between short rests. The fighter PC is probably not happy with cantrip spam at the moment...
When I have made a battle too hard one of two things happen - TPK or a few of the party members flee and survive. Either way I don't pull punches. Players can always roll new characters.
The worst encounter was a 1E encounter I did back in the day with some Devils (I think Erinyes), who could summon devils, who in turn could summon more devils .....
It was a pretty fair fight until a few lucky rolls took out the Rogue, a magic-user and a Dwarf Fighter who needed a 2 to save and rolled a 1.
At that point the remaining 3 characters were still way more powerful than the remaining devils and would have easily won a figtht but with 4 Devils on the battlefield and a 30% chance of each summoning 1 or more every turn and those summoning .... and the remaining party members only being able to take out 1 devil a turn .... and the enemy being Lawful and intelligent, they just started summoning and the number of enemies the party was facing slowly grew every round, they would kill 1 and 2 or more would be summoned. The Bard saw the writing on the wall and fled (this was a 1E Bard) fled, the Dwarf who was charmed or held or something got tortured to death off screen after the fight everyone else got killed in the fight.
We turned the Bard into an NPC who hired some new adventurers (new NPCs) to finish the quest.