Advice for DM trying to make game more satisfying

Where I have noticed the problem: I have been running a campaign that recently has had two very roleplay/exploration heavy arcs (really 1 arc, and the consequences of that arc). The arc in question was a heist, where the players were attempting to steal literally a large amount of money from a mansion. They were decidedly unsuccessful. In the process, one of they split the party, and one of the player’s created a distraction so the others could get away. That player was decidedly not happy about this being a noble sacrifice, and so rather than the town guard killing the player who created the distraction, they instead captured him and took him to jail where he is being interrogated (so they can find his accomplices). That player is now playing a backup character, and the whole group is trying a jailbreak. The last session ended moments before rolling for initiative after the captain of the guard discovered the deceit they were attempting to use to gain access. They are now very likely in a flee or die situation.

My problem is this: In both instances, their entire plan has been predicated on deceiving someone into giving them access into the target area, regardless of whether that person would give them access. In the example of the heist, they attempted to fool the guards into believing they were attending a party thrown by the owner of the mansion. In the jailbreak, they attempted to convince the captain of the guard that they were famous doctors who believed that the prisoner in question carried the bubonic plague, and that they needed access to him immediately. The problem being that even if the target of the deceit might let them through if they believe their story(which particularly in the instance of the jailbreak is not likely), it’s predicated on them succeeding on their deception, and if they fail the deception they have no backup plan, do not improvise something else, and instead complain that the DM just doesn’t want them to succeed, or want to try the deception more elaborately, or argue why it should have worked, before moving onto something else. Needless to say, this is murdering pacing and causing a lack of enjoyment, at least for me, although some of the players have claimed to really like the last couple sessions.

Has anyone run into something similar, and what did you do that helped increase overall satisfaction?