To quote HP:MoR:
"You wouldn't go along with that and neither would I," said Harry. "This is our world, we don't want to break it. But imagine, say, Lucius thought the Conspiracy was your tool and you were on his side, Dumbledore thought the Conspiracy was my tool and I was on his side, Lucius thought that you'd turned me and Dumbledore believed the Conspiracy was mine, Dumbledore thought that I'd turned you and Lucius believed the Conspiracy was yours, and so they both helped us out but only in ways that the other one wouldn't notice."
Draco did not have to fake being speechless.
Father had once taken him to see a play called The Tragedy of Light, about this incredibly clever Slytherin named Light who'd set out to purify the world of evil using an ancient ring that could kill anyone whose name and face he knew, and who'd been opposed by another incredibly clever Slytherin, a villain named Lawliet, who'd worn a disguise to conceal his true face; and Draco had shouted and cheered at all the right parts, especially in the middle; and then the play had ended sadly and Draco had been hugely disappointed and Father had gently pointed out that the word 'Tragedy' was right there in the title.
Afterward, Father had asked Draco if he understood why they had gone to see this play.
Draco had said it was to teach him to be as cunning as Light and Lawliet when he grew up.
Father had said that Draco couldn't possibly be more wrong, and pointed out that while Lawliet had cleverly concealed his face there had been no good reason for him to tell Light his name. Father had then gone on to demolish almost every part of the play, while Draco listened with his eyes growing wider and wider. And Father had finished by saying that plays like this were always unrealistic, because if the playwright had known what someone actually as smart as Light would actually do, the playwright would have tried to take over the world himself instead of just writing plays about it.
That was when Father had told Draco about the Rule of Three, which was that any plot which required more than three different things to happen would never work in real life.
Father had further explained that since only a fool would attempt a plot that was as complicated as possible, the real limit was two.
The way you avoid plot holes is to have very simple plans. To be fair, these plans don't need to appear simple, but they need to have no more than two things "go right." (Incidentally, identification of these crucial points makes for excellent times for PC involvement.) Plans like you articulated in your question, the "Step 1, step 2, step 3" plans so derided by competent military strategists because they break down and are vulnerable to moments of fridge logic. As enemies are prone to think about your plans in a completely different way ... don't make them too complex.
Instead, focus on logistics. The two steps don't have to be easy, but by figuring out the logistics trail needed to accomplish them, you have all your "elaboration" and complexity which goes to support two and only two things.
From a "writing the storyline" point of view, don't write what will pass. Instead, give your NPCs intentions which will shape their actions. By giving them intentions but without locking them into step 1, step 2, step 3 plans... you allow the world to resonate to player choices and accidents.
As an additional note, use PC imprisonment very sparingly. It's generally not fun and very hard to set up without being heavy handed about it.