The main difference is that in fact, 'on a wing and a prayer' refers to a real sense of relying on minimal resources or a last hope. For example, a small business that is barely surviving might be said to be on a wing and a prayer. In fiction, it can be a more fantastical or overly dramatic situation. Like in a science - fiction story, a spaceship could be 'on a wing and a prayer' while escaping a black hole, which is a much more extreme and less likely real - life scenario.
The truth is that 'on a wing and a prayer' often implies a situation where one is relying on very little except hope. In fact, it comes from a real - life situation where pilots might be in a precarious position during flight and have to depend on their last hopes. Fiction might exaggerate this idea into something more dramatic, like a superhuman effort to stay in the air. But the core of the phrase is based on the real - life perils of flying.
Well, it could be inspired by real events but might have been embellished or changed for dramatic effect. Not everything presented might be strictly factual.