@H. Malcom WalkerYep, those twists don't write themselves, instead they have to be planned.
One technique I've often employed, is to have the protagonists (i..e. the central protagonist and their friends) debate their various options, listing several, then they'll begin debating each, dismissing the most obvious and working down, to arrive at the best strategy.
So, you simply have them dismiss the ultimate solution, so readers won't expect it, yet when it occurs, they'll slap themselves on the head and exclaim "Oh yeah, they did discuss that one, and it did work, after all!"
It's an amazingly simple strategy, based entirely on the rhetorical 'Rule of Thirds', where you either list one thing in detail, two things sharing similar properties, or three things which are nearly identical. It's a way of prioritizing what to include in writing, and thus in storytelling too.
Thus, if you ever include more than three things together, your readers will never grasp them all, never remembering any of them, which is WHY you avoid Info-Dumps, as the human mind is simply incapable of processing them.
By the way, those 'literary devices' were first developed by the ancient Greece playwrights, who performed the same plays, over and over in each town they performed in, each time varying the material so it remained 'fresh', yet afterwards, they'd compare and contrast which worked the best, so they could focus on the most successful.
And those same 'literary devices' were what Shakespeare rediscovered and why his writing had such an outsized impact, as ALL he did, was to tell the exact same stories which were popular in his day, using the forgotten literary devices to breath new life into those stories. So now, no one remembers those original 'popular' stories, as they were eclipses by Shakespeare's versions (all published in a single volume), which is why most literary giants, and most political strategists, use them so extensively what writing out politician's scripts to read on air.
You think all that applause is accidental, they're all carefully constructed, using the self-same, 4,000 year old literary and rhetorical devices.