And yet, the players (some of them) lived. That GM was either lucky, or he perfectly eyeballed his players, the defenses, the usefulness of the 2nd level villagers, and the amount of kythons he would need to make that fight perfect, seat-of-the-pants and could go either way.
Keep in mind that for each of the smart decisions the players made (deploying the hammer, using flyby attack) they made stupid ones (cleric staying in melee range of the slaughterthing, not using cover/defense spells to avoid bone shards/acid globs, not having the noncaster elements of the party flying).
And furthermore, he made it clear that this was a fight he expected the PCs to run away from. They chose to stay for a last stand anyway. He literally could not lose. If they won, it was an epic, glorious, battle that they will talk about for years. If they lose, it's a heroic sacrifice and he can think of an interesting way to keep the campaign going. Either way, GM wins.
In your example, the clues given were presented as 'tentacles out of the ground'. And your players were not 'veteran' or 'optimized' enough to interpret that properly. And you knew that they hadn't because you had access to their sheets and saw no defenses to the killer combo you were about to unleash. And then you unleashed it.
Contrast this to the other GM: He told them, straight up, that this fight could kill them three or four times over easily. They knew the CRs of what they were fighting compared to them, even the basic statistics, even if they didn't metagame at all. He then bent the rules to let them prepare in a thematic and fantastic way (training up villagers), set up a brilliant, hard, excitingmy opinion, seeks to avoid that. Even used as a way to try to salvage a game's attention by being brutal and gygaxian for a while to get people to take the game seriously, it's a suboptimal method to achieve that since it can so easily go the other way (losing what little immersion and characterization and interest people have as theit characters die over and over again).
If players are not optimizers, killing them many times doesn't significantly increase the chance they might become optimizers. And not all games have to be paranoid DM vs Players style games. Sometimes you can, y'know, tell a story about some heroes. And those heroes can totally mechanically do heroic things, without having to always be tier 1 classes that have no abilities that don't add to their power as much as possible.
Finally, you can absolutely spank a group of PCs with to show them that perhaps preparation might be a good idea without instakilling them. In the situation you described, simply using Evard's, on it's basic own, would have been perfectly fine. Evard's + Fireball, or Evard's + Summon Swarm, or Evard's + Entangle or something.
Essentially you could have done lots of things without instamurdering the party. Instamurdering the party was unnecessary. You knew you were instamurdering them. And you did it anyway. And from my understanding of the situation, instamurdering them was not plot-relevant, and it was not thematic, and it was not heroic. It didn't really serve a purpose. Maybe your players like rolling up new characters and like getting pwned cause it's fun for them. If so, they are atypical players. And you need to state that when you're talking about this situation.
But no, the party was not doomed from the start. They were doomed when you decided to use your TPK maneuver despite them not preparing for it. That's the exact point at which they were doomed.