I think you need to be nuanced when you're talking about second order causal relationships. The example of the Captain is on one end of that spectrum. The DM could have easily inserted a phrase like
Sir, I could not help but overhear... and everything is shiny. Even easier if the Captain was actually in the room. Those make sense and I don't think anyone's immersion is being kicked in the face there at all. However, once we approach the other end of the spectrum, where we are now talking about divine aid and other things that are more in the
deus ex machina camp, I think DMs need to be very careful. I also think that the notion that success can extend past what is circumscribed by the rules also needs to handled with the deftest of touches.
Part of this discussion centers on the idea of automatic failure.
@Ovinomancer has correctly identified the sort of adjudication mechanic in question for D&D, that of GM decides, and I think he also makes an excellent point that the fiction should still be your core point of reference. There are really two examples in play here, and I think they are somewhat different. First, we have the impossible jump, and second we have the intractable NPC. The main difference there is that in the former case the rules themselves prescribe jumping distance, and not just a rule, but a very player facing rule, one tied to a core stat. The stakes of a PC action declaration that
I am going to attempt to jump the 50' chasm thus has a built-in and pretty obvious failure state - i.e. that the rules say you can't. That is not to say that divine aid or somesuch couldn't be appropriate in some cases, but, simply put, the player is announcing that he is going to attempt a task that he
knows to be impossible, essentially throwing that in the DMs lap and daring him to allow failure. Perhaps he prays to his god, or does some deep knee needs to warm up, but that's window dressing for most characters and most fictional frames. Except in some very specific dramatic situations I don't think it's appropriate or necessary for the DM to adjudicate success there. This is very much in the shooting an arrow at the moon set of examples. The number of cases where the fiction will override the basic impossibility of the action are very few.
The example of the intractable NPC is very different I think, for a number of reasons. Let's set aside for the moment the conversational equivalent of the moon arrow, which includes things like asking the dragon to give you his horde for no reason, or asking an implacable and evil foe to start putting flowers in the barrels of guns. Before we set those examples aside, it's worth noting that they are already different from the chasm jump in one important respect - the
rules do not say the action is impossible, and there is thus no rules-mandated failure state. We have moved into the realm of ultimate power - DM fiat. For the most part, those extremely unlikely examples we are setting aside are not impossible due to the rules, but rather for reasons that might be branded common sense - Dragons do not generally give away their hordes. I would submit that this is still broadly similar to the chasm jump though, as most players should realize that its not going to happen on a simple ask, no matter how charming you are, and I don't think that's really an example of an intractable NPC either. That leaves us with cases of intractable character traits, the discussion of which requires a few more tools.
I think the notion of intractable character traits is really striking to the heart of social interaction in general, and how different styles of play, and different methods of NPC and encounter building start to become of paramount importance. First, we need to look at what an intractable character trait actually is, and what that should mean for adjudication social interaction. Lets say we have an NPC who has been given the trait
Devoted - will not betray his lord for any reason. That seems pretty intractable, right? It really isn't though. In order to frame actions and responses we need to talk about motivation and objections. Could a character like that be lied to, be convinced that action A is protecting his lord when it really isn't? Of course. Could he possibly be persuaded that allowing the PCs past his station is the right thing to do because his lord's life is actually in danger? Of course. Could he be convinced to fatally poison his lord's wine, for any reason? No, he couldn't. So intractable only really applies up to the point where the NPC's motivation to accede to a request overcomes their natural reluctance to follow the rules, or to put it another way, it applies until the fictional frame is shifted enough that their intractable trait is no longer the primary objection. In addition to reframing to overcome objections, there is also the idea of leverage, which comes into play much more strongly in the case of neutral or hostile NPCs. The easy example there is that fear for one's life is leverage that can overcome a lot of seemingly intractable character traits, but also in the mix are fear of embarrassment, greed, threats to cherished possessions/people, the prospect of advancement, appeals to authority, and a bunch of other things.
Given the rather long list of methods the PCs might use to circumvent, modify, or otherwise overcome even the most intractable NPC, I don't think it makes a lot of sense for the DM to rule by fiat that the action is impossible. You could certainly start with a response that indexes a complete refusal by the NPC to comply, but that doesn't mean that a clever party might not be able to find away around that refusal. In most cases I think it's appropriate to leave at least
some room in the fiction for success.