My method: Consolidated Branching
A D&D campaign isn't - or at least shouldn't be - like a novel that is already written out; the story should be written by the players and GM together as they play. It should be more like a storyboard that frames out a plot without filling out details.
The above image shows the rough draft of my Act 1 "storyboard" for my current campaign. It reads from bottom to top of page if you're curious, but the important point is that it progresses from where the party is currently, through a web of potential encounters, which all lead to another single "checkpoint." This allows me to construct an overall plot with particular twists and climaxes while leaving the choice of how to get there up to the players. So far my relatively new players haven't broken away from the plot I've been guiding them on, but if they were to do so it would be a simple matter of adding a new branch that ties into the current tangle - I don't have to rewrite the whole thing.
Deconstruct your campaign and identify the critical points and features in it. Also identify which of those are necessarily fixed or ordered and which are flexible. If the campaign goal is to find and raid a dragon lair, entering the cavern where he lairs is an ordered critical point: it has to happen, and it has to happen before any adventures in the lair happen. If they have to have a key to open a door in the dungeon leading to the cavern, that is a flexible critical feature: it has to happen but the key could be given to the party by the quest-giving NPC or it could be hanging on a peg next to the locked door or they could obtain it anywhere in between. If the party can take a side quest to obtain a particular item which would be beneficial but not necessary to the quest, then it is not a critical feature: give opportunity to seek out the item but do not railroad the players into it.
With that example you'd end up with at least two checkpoints - getting into the lair and defeating the dragon. You could optionally make finding the key another checkpoint, or finding some weapon or magic item that would be necessary to defeat the dragon as a checkpoint. Leading up to each of those points would be a series of context-friendly encounters; perhaps the party must spend a week fighting their way through orc territory to get the key, or the location of the cavern is unknown so they must explore the kobold-infested mountain to find it. They may have to politic themselves into a royal court to obtain the magic ring that can undo the dragon's warding spells. Your campaign will dictate what kind of semi-random encounters your party has.
Have at least a basic world map drawn out with some brief political and geographic data. That way if your players do throw you a curve you have a foothold from which to improvise.
Design each encounter (with few exceptions) to be handleable as either a combat or non-combat encounter. Rank the difficulty of each version separately; negotiating with an orc chief to get the key to a lair full of treasure is probably harder than fighting him and his personal guard and fleeing the camp with the stolen key.
Don't hedge yourself in with details. Don't, for example, draw a detailed map of the mountainside for the party to meticulously scour. Instead, ask for their search method and assign a DC to finding the cavern with that method - surveying with a spyglass from across the valley or other efficient methods should lower the DC compared to wandering aimlessly among the rocks. Failed checks result in encounters with locals or wildlife (not necessarily contentious). Too many details about where exactly the entrance is, where exactly the kobold camps are, etc. only about you and the players.
Lastly, don't be afraid to change aspects of the story in response to your players' actions. While having a static set of options for them to progress through is certainly easier on the GM side, there's a certain satisfaction as a player when the GM pulls out his notebook and eraser after an encounter that the party handled in an unexpected way. It also can inject some new interest for the GM... I don't know about you but after a couple months thinking over the same campaign design problems, I tend to get a bit bored.
Unless the campaign book you've chosen is particularly restrictive (which may be part of why it has such bad reviews) you should have ample leeway to allow the players some freedom while still having them "regroup" at specific critical points during the campaign. This allows them agency to play as they wish while still progressing in a story that is largely under your control.