So, yeah, the idea that a couple of thousand knights of the Vale could just jump out from nothing is a bit of a stretch—I mean, were they hiding in the shrubbery? But it’s something I’m prepared to forgive (fog of war and all that).
And I don’t think you can call their appearance a deus ex machina—after all, it’s been established that their coming was an option, and one that Sansa had chosen to realize. Their timing is convenient, but there’s something to all stories that I think helps explain this—in the end, we only hear stories where there is some measure of success to the heroes (or alternatively, tragic failures). If Jon Snow’s forces were just crushed at Winterfell, and that’s that, then nobody would bother to tell that story—just as nobody bothers to tell the story of the knight set out to slay the dragon, who then succumbs to dysentery along the journey. The story is worth telling because of the unlikely rescue.
That said, it might have been more satisfying if some northern house had chosen to turn on the Boltons—but I can also see the reasoning behind that not happening: there was a lengthy arc devoted to showing the rift between Starks and Karstarks, starting with Jaime killing the Karstark son, then Catelyn setting him free, Lord Karstark killing the Lannister cousins, and Robb executing him. All of which are points that, even if one might disagree with the actions, have some well-fleshed out motivation behind them; having the Karstarks now turn tail would have negated all of that development.
House Umber is a bit more difficult, but still, after all, Robb has effectively gambled away the north because he chose to break his oath to marry a Frey daughter, leading to great loss of life; also, Last Hearth is the northernmost keep (aside from those of the Watch), and thus, likely to view the act of bringing wildlings across the wall an act of treason—they’ve had to defend against wildlings for centuries. And note that the Umbers don’t swear fealty to the Boltons, but ask for aid against the wildlings; so in their view, Jon and his forces are essentially something like a King beyond the wall leading his forces south, not the House Stark they owe fealty to. (Also, the lands that Jon promised the wildlings—are they part of Umber territory?)
From this point of view, it doesn’t strike me as unlikely that they’d rather fight alongside the Boltons than switch sides. And I think that most of the lesser houses will simply not dare to act against Ramsay—which is known to have some unpleasant circumstances.
As for whether the whole thing was a stratagem by Sansa, I’m on the fence—I would really like it to be true, but the show doesn’t exactly like to give me what I’d like to have, it seems. Jon’s actions, I think, were well in line with his characterization—he does know nothing, after all. And re other characters who acted that foolhardy getting their comeuppance, if the idea of Sansa (or Littlefinger) counting on Jon’s foolhardyness was right, then this would actually be an instance where people learned from this—anticipating what would otherwise have been a lethal defeat for the Stark forces due to Jon’s lack of acumen, they turned it into victory instead.
I’m not greatly bothered by the fact that, had Wun Wun not lived, Ramsay could have holed up in Winterfell—after all, at this point, he has like fifty men, tops, and there’s an army outside the walls; time, if nothing else, would have meant victory in the end.
So, all in all, I think this was a much more satisfying episode than the last one—not just because Ramsay finally got what was coming his way (but that does play a role, I’ll freely admit).