Loghain isn't wrong. Strategically, tactically, holding the Darkspawn at Ostagar was just plain not going to work. Too many darkspawn, the fortress was in ruins and not actually defensible, and the army was in a bad position.
I would like to preface this by saying that I'm very unhappy with myself for making this post. Moving on.
We don't have numbers, relative unit quality, or force multipliers for either army, so it's not clear what justification you have for saying that it was "just plain not going to work". We have the self-serving public proclamations of various persons involved in the engagement, but they're not exactly worth much.
It's possible to read each of the things you mentioned in multiple ways.
Strategically, Ostagar was a forward position that, if held as long as possible, would shield Ferelden and its citizenry and its manpower reserves and its tax base from the Blight. Operationally, Ostagar was connected to the rest of the kingdom by the Imperial Highway, which made its communications situation as good as it possibly could be, and it was situated at a relative choke point that limited the ability of any force coming north out of the Wilds to move beyond it into Ferelden.
(Conversely,
failing to fight at Ostagar would be devastating for Ferelden. Ostagar was the best place to fight south of Lothering; north of Lothering, the country opens up considerably and the Fereldan army would find it impossible to occupy a blocking position that would prevent the horde from moving north. Once the horde was into the Bannorn, Ferelden's war effort would start to collapse: food sources and tax revenues would dry up, individual banns' armies would get swallowed, and the horde would gain deployment space and room to maneuver its larger numbers to trap the Fereldan army. Under such circumstances, it would not matter if the army were saved from destruction at Ostagar: it would be doomed to a certain slow death anyway. Unless Ferelden were to call in foreign military assistance, the kingdom's survival would be unlikely.)
And tactically, regardless of the state of the fortifications, any fortress (in ruins or otherwise) is a useful force multiplier or
point d'appui; it did not need to withstand a formal siege, but any wall would be a helpful wall.
The strongest argument against fighting at Ostagar is the worry about defeat in detail. It's clear that the Fereldan army was missing 'major' contingents during the campaign, and only narrowly managed to gain receipt of others before the battle began. In theory, the darkspawn could have overwhelmed separate parts of the Fereldan army as they mustered and moved south. That's actually a fairly difficult balance to keep: on the one hand, you want to be able to deploy as far forward as possible to avoid the Fereldan heartland coming under attack, but on the other hand, you don't want to lose your army in a bad situation...but on the
other other hand (yes that's three) if you can't fight in the far south your chances of winning operationally are extremely slim...point is, you can argue both sides for this. It's not a clear-cut "fighting at Ostagar was the RIGHT THING TO DO" or "fighting at Ostagar was STUPID AS ALL HELL".
But let all that go. Even if we did know those things, we still wouldn't be able to say who would have won the battle, because premodern battle was a lottery over which commanders exercised only a very small amount of actual control.
And Cailan's plan of "One glorious battle to confront and kill the Archdemon" was suicidal. He was too wrapped up in his visions of the glory and adulation to come to see how precarious his strategic position was. Cailan was playing at war. Loghain wasn't.
Every single higher military commander in
Origins is an idiot. Loghain, Cailan, the Archdemon, and whoever comes up with the plan of campaign after the Landsmeet - Eamon, presumably. Each of them makes some absolutely stupid decisions that make it hard to take any of them seriously. This is partially because some of them (Cailan) were written that way intentionally. It is also partially because BioWare's writers are not warfare subject-matter experts and therefore are not very good at writing about complex military subjects; attempts to write military commanders as being "good" commanders founder on a failure to discern what a "good" commander's response to a given situation ought to be, while descriptions of battles - both in prose and in cutscenes/gameplay - contradict both the way battles are actually fought and the way that battles are supposedly fought according to BioWare's own lore.
Yes, Cailan's not very good at thinking about warfare in a systematic and intelligent way. That's very true. Unless the Archdemon showed up (and unless the Wardens killed it) the Blight would be far more than one big battle for the tales. Loghain, however, is also a doofus, because as much as he trades on his reputation as a military genius, the reputation is all he has - not anything to actually back it up. Loghain presents no alternative plan for the Ostagar engagement; he is, in fact, the architect of
Cailan's plan, and presents it at the war council. As stupid as Cailan acts, Loghain lodges no substantive complaints about the way Cailan wants to fight at Ostagar: he whines about glory-seeking and the presence of the Wardens, and darkly hints that things won't be as easy as Cailan seems to think, but he does not say that the army should not fight at Ostagar. Even the semi-argument that Loghain and Cailan have about "waiting" for troops from Redcliffe and/or Orlais is a red herring, because there is no such thing as "waiting" at that point. The darkspawn horde is there: either the Fereldans would fight it, or attempt a retreat in the face of the enemy. There is no "wait" option.
If the decision to fight at Ostagar was a stupid one, then, Loghain was equally as complicit in that stupid decision as Cailan. Or he was a traitor. Either way.
As for the Archdemon and Eamon, the later campaign is simply bizarre. The Archdemon's appearance at Denerim made no sense: if it stayed hidden, the Blight would be, to all intents and purposes, unstoppable. Exposing itself at Denerim changed the likelihood of darkspawn defeat from "zero" to "something more than zero". It had no reason to show up and every reason to stay away, and it showed up because that's what the plot demanded. And Eamon bizarrely chose to muster the armies at Redcliffe instead of Denerim, a choice that makes sense in terms of plot and game mechanics but not in terms of strategy. Denerim's a more important thing to keep and a more valuable target for the darkspawn. Redcliffe only theoretically makes sense in the event of a plan to unite with an Orlesian army on the border while writing Denerim off, but obviously the Fereldan army did not write Denerim off, so...yeah.
Loghain wanted Cailan to listen to reason. He as much as says so to the Hero of Ferelden if you seek him out at camp before going out into the Wilds. To pull back, use part of the army as a delaying force, buy time to get the Arls' butts in gear (which is something they wouldn't do unless they could personally *see* the hordes at their doorstep), and draw the darkspawn into an asymmetric war as they had successfully done with Orlais.
Fighting a partisan campaign against the Blight is an abominably stupid idea. Darkspawn spread the Blight. The Blight destroys the earth. It poisons the water. It kills crops. It kills villagers, when it doesn't turn them outright into ghouls. It's not like the Orlesians, who would try to maintain outposts and keep order and make sure that Ferelden's government, society, and economy were functioning. There is no civilian morale to target, no ways in which the darkspawn could be made "uncomfortable". Splitting up the army into a bunch of tiny raiding groups would only divide forces and make them easy prey for the horde. Partisan warfare against the darkspawn would accomplish nothing.
And a massive defense in depth, in the fashion of Washington in New Jersey or Herakleios in Armenia, would be just as bad, because
the Fereldan army still wouldn't have a way to get supplies. The only way to ensure steady access to food would be to actually protect food sources, but the whole point of the sort of campaign that Loghain supposedly had in mind is that mobility - not being tied down to specific areas - is the only advantage that the Fereldan army might have. That would be lost if the Fereldan army had to commit to defending an unblighted safe zone. If Loghain proposed to fight a war of maneuver against the darkspawn like that, his army would starve - unless it was killed off by the Blight's disease first. Once the horde started to leak into the Bannorn and spread the Blight, Ferelden would be screwed.