This is something that all writers will encounter during their career. There is no escaping it; writers will run into this problem. As they continue to flush out their story, a writer will inevitably write themselves into a corner (whether in the planning/outline stage, or during the writing itself). Their story will inevitably get to the point where it needs help! The question is: Does the author force a rewrite? Or do they use a deus ex machina to save the day?
Excerpt from Wikipedia: The Latin phrase deus ex machina, from deus (“a god”) + ex (“from”) + machina (“a device, a scaffolding, an artifice”), is a calque from the Greek “god from the machine“.
It is a mechanism employed by writers to solve a problem in the story – usually using divine intervention, or some unknown spell or magic, or some secret passage that was unbeknownst to the reader – that comes in at the last second and saves the day. Especially in the fantasy genre, the deus ex machina mechanism is disliked by readers in general. The issue with this is it doesn’t allow the characters to overcome the problem on their own. Additionally, it’s not fair to the reader. It would be like reading a mystery novel, constantly trying to guess who the murderer is throughout the book, only to discover that the murderer is no one that was ever introduced anywhere in the novel before. It ruins the experience.
For those that may be struggling or wrestling with their story right now, trying to overcome a roadblock, I encourage you to either work through it and/or rewrite it. Don’t give in to the deus ex machina. It’s the easy solution, I know, but it will also degrade the quality of your story. A solution that worked for me was to engineer the solution by mind mapping my story arcs and character motivations. It is like the movie Apollo 13, where the astronauts were in trouble and the guys back at NASA had to come up with a solution using nothing but the tools that the astronauts had. In hopes that it gives you motivation, here is the scene:
[Several technicians dump boxes containing the same equipment and tools that the astronauts have with them onto a table]
Technician: We’ve got to find a way to make this
[square CSM LiOH canister]
Technician: fit into the hole for this
[round LEM canister]
Technician: … using nothing but that.