The literary concepts of deus ex machina and eucatastrophe are not synonymous. Both are sudden reversals at the climax of a narrative where things are looking grim for our protagonists, but calling eucatastrophe a subset of deus ex machina misses an important nuance.
Deus ex machina, “god from the machine,” is a term originating from ancient Greek theater. When the heroes were in an impossible situation and the play was out of time, a god character would be lowered from the rafters above the stage and hand them victory. Today this is considered flawed storytelling. It breaks the integrity of the story to have an external force resolve the conflict: nothing leading up to this point actually mattered. It feels arbitrary, as if the storyteller had no plan.
The eu (good) catastrophe, the happy disaster, also saves our heroes from an impossible situation. But they are saved because the outcome of their failure is unexpected success. It is not an external intrusion, but a direct consequence of the story pieces already in play.
Since Tolkien defined the term eucatastrophe in On Fairy Stories, an explicitly religious essay defending the specific writing goal of pointing to Christ’s resurrection with fiction, I consider it disingenuous to separate the term from a Catholic mindset when defining it (as Wikipedia has done, and I assume some literature courses somewhere). When Tolkien proposed the term eucatastrophe, we know from the text and his letters that he was thinking of Christ. As a Catholic, he believed that Christ’s complete defeat and death was a necessary part of the process that saves mankind.*
In a eucatastrophe, what looks like a huge loss is the reason that our heroes succeed. It’s not merely an emotional beat sequence of almost-defeat and then unexpected-success, but a causal link.
The archetypal example of the eucatastrophe in Tolkien’s work is not the eagle rescue, but Gollum biting the ring from Frodo’s hand. You can also find deus ex machina in Tolkien: he used both literary devices to explore a larger theme of grace. But in a eucatastrophe, the interference of supernatural grace is not a negation of character agency but instead uses the antagonist’s actions, intended to harm the heroes, for their good instead (as in the story of Joseph, Genesis 50:20).
Another common way of summarizing Tolkien’s eucatastrophe essay is to see only an argument that a deus ex machina providing an unearned rescue can be satisfying. And I think that statement is correct, and that not all story consumers count it as a flaw. But defending deus ex machina does not need a new term, so I’ll fight for using eucatastrophe to indicate a different literary technique, one that does not break the logical chain of events making up a plot.
* Footnote… I am summarizing recklessly here, since theologically this is one of those Big Deals that gets subtle quickly, and what I consider relevant to this argument is Tolkien’s understanding when I am not myself Catholic. See Catholic Biblical commentary on Luke 24:26.