I said "could have" and never typed the phrase "without a doubt". I never said I knew that would happen. I said it maybe could have. I posted possible scenarios had they not retreated and the closest thing I said was that, chances are they could have held out. Which is my opinion, just as yours is that there's no way and they would have been wiped out (or at least Loghain believed that).
Between what I know of the game and my playthroughs and such, I believe he deserves to die ten times over. Nothing he did could justify the deaths of all those civilians, of the decimation of the Grey Wardens in Ferelden, regicide, and slavery. It was also far to horrid to warrant any kind of second chance. That's my opinion.
My opinion is that barring the Archdemon suddenly appearing and the Wardens killing it (which judging by Oghren's dialogue right after the full-party fight and the number of surviving darkspawn in the scene where it dies, is the only reason the PC won at Denerim) Ostagar was a lost cause. My major support for this opinion is the large darkspawn column we see from the bridge of the Tower of Ishal, though the problem where the beacon gets lit at what is almost certainly the wrong time (Alistair can't really be sure of keeping track of time, though even if he could he admits he believes it to be late) is also unhelpful. I've admitted that the Archdemon could have turned this around (again, I believe that happened in Denerim) but Loghain's scout report leads me to believe that that was unlikely to happen. So unless you have some good support for an opinion that the battle was winnable I'd have to say that Cailan dying was almost certainly unavoidable as soon as Loghain failed to keep him off the front lines.
That leads directly into your opinion as to the Wardens, the validity of which depends on whether or not we have reason to believe we know whose idea it was that they all be on the front lines with Cailan. If it was Loghain, that is indeed on his head due to his failure to keep some in reserve, but from pattern-matching with people who previously cited that as worthy of death in and of itself you're probably factoring in the literal necessity of the Wardens when you calculate that as execution. The problem is that Loghain had no real reason to believe that to be true, since it does not logically follow from any information that we had any reason to suspect Loghain was privy to. I'm not saying that Loghain was being logical. He was not. I am saying that the conclusion his non-logical mind came to as to the legend that only a Warden can kill an Archdemon is the one a logical mind would come to barring a specific reason to come to any other. (I freely admit that this argument rests on a rather major assumption as to your rationale; feel free to give your true rationale if this is not it.)
Blaming Loghain for the civilian deaths at Ostagar is fairer, but I don't view him as culpable enough for the death penalty (even accounting for my distaste for it.) Loghain makes clear at the Landsmeet you get to see part of before Lothering that he wants to attack the darkspawn horde again. He has the irrational idea of doing so with a mostly* Ferelden army, despite the fact that Ferelden's best attempt at raising an army has proven insufficient, but his exact words so far as I remember them are "We must defeat this darkspawn threat, but we must do so sensibly and without hesitation." It is Teagan who does not see this as the first priority. That he does nothing to attempt to placate Teagan puts some of the blame on Loghain, but once the war started I don't know what you expected him to do differently than he did. The rebel lords' lands were between him and the darkspawn. He'd have needed to move his supply trains either right through their lands or within spitting distance. I don't see how making the darkspawn his first priority was still doable at that point.
As for the slavery, that's out of scope. I've stated numerous times that I'm only defending Ostagar. The rest of it I agree with you was indeed heinous. I don't agree with you that it merited the death penalty, since I'm not big on capital punishment, but that's moot since I agree that the Warden was smarter to kill Loghain than to keep him in the same camp the Warden sleeps in. (To the best of my knowledge those are the only ideas anyone floats.)
* DA2 establishes that he went to the Free Marches for help, which I don't believe contradicts anything in DA:O; all that is made clear in the first game is that he's not accepting help from Orlais, and that he's willing to accept support from certain countries that are not Orlais. Of course, this doesn't make much difference, since Loghain's requests for aid apparently weren't getting many bites.
Anora flat out asks him did he kill her husband. He is ambiguous and evasive. Cailan being the "author of his own fate" is compatible with Loghain feeling he had no choice but to get rid of him for the good of Ferelden, similarly, to remove the wardens with Cailan as a side casualty. He says nothing about the futility of any rescue to clear his own name from blame for deliberate murder. Yet he believes he has to give - well a bit better - account of himself to Wynne? Anora later tells the warden that Loghain murdered Cailan. He can't or won't keep Anora on side. Loghain comes across as incompetent and irrational.
My rationalising thing was just how I interpreted Wynne's meaning in the last line of the first one: He tied his hands behind his back to prevent himself, then later, says that it was other circumstances made it impossible, "forgetting" about the self-tied hands.
That probably is what Wynne means, now that I look, but it doesn't seem to be supported by the evidence I cited as to why the battle just wasn't winnable, and by Loghain's (apparently persistent, to judge by Cailan's tone) attempts to get Cailan out of the deathtrap. As for your interpretation of his dialogue to Anora I see no evidence against it during the scene it appears in, but I don't think there's strong evidence to support it either. In that scene or the rest of the game. I agree that Loghain's behavior looks weird at certain points if you accept my explanation for these dialogues, but I think it causes more during Ostagar itself to make sense than it causes not to.
As a final note, I apologize for the wall of text, but I don't think I could have done much better.