I had one TPK when the players assumed the great wyrm they were talking with was evil and attacked it. They also learned the difference between "green dragon" and "emerald dragon" that day.
Sounds like a group I DM'd for a few years back in 3.5.
They'd decided that they needed to recruit the aid of a local Bullywug tribe. So they set off into the great swamp to gain an audience with the Bullywug King. Eventually they succeeded.
Through bad RP & worse dice rolls, they completely failed to sway the Bullywugs to their cause.
But they were persistent in their pestering for aid.... So the King told them "Fine, I'll pledge 100 braves to your cause. But only if you can bring me the head of the Pan-Lung who drove us from our ancestral home when I was a child."
(as we played an idea for another swamp adventure/side-trek had come to me)
The party quickly agreed to the terms, received directions to a massive ruin deeper in the swamp, & there the session ended. Well, at least I knew what to prep for next week.
{Pan-Lung are Oriental Water Dragons. VERY powerful, far far beyond the capabilities of the characters hunting it. Lots of innate magical abilities. Not evil.)
None of the
players , let alone their characters, knew what a Pan-Lung was. And none of them bothered to ask. They didn't even ask the Bullywug King what it
looked like.
What followed was 3 weeks of exploring the upper parts of a large sunken city, encountering antagonizing & killing a # of not-necessarily hostile monsters, occasionally RPing with a an NPC who'd appear to them as a young oriental woman (Pan-Lungs can shape-change), and goofy high jinx.
Eventually they stumbled across the PLs actual lair, saw her in her true form, & prepared to fight yet another monster (still having no idea that this was the Pan-Lung).
Seeing that the party was about to attack, she changed into her human guise, revealed that SHE was the Pan-Lung, & tried to reason with them.
Some years before she returned home to find the city she'd lived in a sinking ruin infested with Bullywugs. She drove them out & recruited a workforce comprised of the various not-necessarily-hostile monsters the party had been chopping up
(an annoyance as it's disrupting the work, but Tasloi etc can ultimately be replaced) to rebuild as much as possible. She offered the PCs peace/safe passage away. She then offered them that + treasure to leave. The PCs could've even talked her into aiding them against the original foes that drove them to seek the aid of Bullywugs in the 1st place - but this never occurred to them.
They denounced her as evil for persecuting the Bullywugs and attacked.
They persisted in their attacks even when they discovered that the Pan-Lung was virtually immune to anything they could do to it & was fighting defensively, trying not to hurt them....
Had the Pan-Lung been evil it'd have been a TPK.
But she wasn't & knew these idiots to be merely misguided. Instead I plane-shifted the lizardman barbarian away to a Victorian garden where he could destroy shrubs until his rages ended* & beat the rest unconscious.
They woke up miles away with a sack containing a basilisk head and a note 1) warning them never to set foot within 5 miles of the ruined city of whatever-I-called-it, 2) wishing them Good Luck, 3) instructions to give this head to the Bullywugs and claim it to be hers, and 4) a warning not to trust the man-eating frog people, as they'd surely turn on the PCs.
*The LM barbarian was never seen again as the player was pissed off that I'd put a monster in an adventure that couldn't be killed & chose to quit the game. He couldn't wrap his head around the idea that combat ISN'T the answer to every encounter.