You can't both have something in place that the party can investigate, plan around and prep for, and at the same time have nothing in place so you can design around what the party preps.
Sure you can, because time is a thing. Most of the time, you're not going to be planning a big heist while standing outside the thing you're going to heist. You're going to be somewhere else, in secret, and moving in the shadows to scout and preplace things depending on the plan. The time between the planning and the heist means things can change and circumstances evolve, and the planning itself takes time.
Remember, even Oceans 11 faced the unexpected constantly.
And if the party literally is standing right outside the place they're gonna rob making their plans, thats where time especially becomes a factor. You're standing around in public talking about how you're gonna rob the place you're standing next to.
May be I'm biased because I've been using and had the Tension Pool used in literally every game I play, but even without a formal system for addressing the inherent risk (and stupidity) of something like that, it isn't an egregious railroad to say that's gonna get them caught before they've started, or for some other complication to arise.
Gygax himself famously ranted about the importance of timekeeping, and he was right. If you don't have any kind of time permanence going on in games like DND, but imo, in any game, then of course you're going to have problems with how certain kinds of things play out.
but I also do not think that the average DM who does not homebrew and is running from a module will. So while there may be some correctness for a percentage of DMs, an RPG must cater to the lowest common denominator of their expected audience in it's mechanics.
RPGs should raise the floor not race to the bottom. There's no reason that kind of GMing can't be taught, even through a book, and especially if we're talking a module.
Its still on the would be GM to want to put in the effort, but thats not something you can change. But you can change something about the great wealth of GMs, especially DMs, who have been absolutely starved of exactly that kind of guidance direct from the game they're playing for years at this point.
but that perforce leads to "what if" and exploring scenarios that end up being just wasted time.
This is why I said if one can't appreciate sessions of improv and world interaction that they're not going to appreciate planning. If you actually like these things,
nothing that happens is wasted time.
I described in another topic an experience with Call of Cthulu where we spent several sessions exploring a rickety old house; not one that was actually haunted or had anything going on. We were lead to believe the house was haunted but in the metascheme it was just the Keepers impetus for bringing the group together.
But it didn't matter, because those sessions were notable for me due to an intense in-character debate with another player over whether or not it was right that Trotsky got assassinated that raged on as the pair of us crept through the basement, and for everyone else a similiar experience was had, because thats just how our group plays.
We become who we say we are and lose ourselves in the gameworld. And its awesome, and never a waste of time.
Which is part of why Flashbacks are a wonderful mechanic - they allow the planning PCs to be highly competent at their jobs. Because traditionally, with little mechanical support, the opposite happen as you say - plans fall apart too easily, so PCs are incompetent at planning, and don't get to be the cool guys.
Sure, but it also isn't very rewarding for the players unless they're getting a really big kick out of leveraging it to do something clever, but even then. Its not that fundamentally different than just saying "Goodberry" and now the wilderness isn't a problem anymore.
And its also not the only way. DND can in fact be fixed; that some people (not necessarily you, mind) are only willing to entertain that possibility if WOTC does it doesn't really mean the opposite is true.
There's been some talk in this thread about heists being spoiled by trigger-happy players -- but if you're running a game where the only way to deal with an alerted guard is to haul out your weapon and roll initiative, it's not surprising.
Improvise Action is a thing in DND. Some don't like to say it counts, but it does, especially in a game that does emphasize rulings over rules when you play it as it advises you to.
You can get a lot of mileage out of not prescribing different actions and just using a nice variety of Ability Scores and Skills to guideline checks. Thats much of what OSR style gameplay revolves around, after all.