There’s a saying that generally gets recognized as a truism that says no plan survives contact with the enemy. This is equally true in RPGs, both for players (because the situation is never exactly what you expect and plan for) and for the GM, whose modified version is that no plot ever survives contact with the players. Inevitably, the presence of a few other clever and creative minds will disrupt whatever plan the GM had in mind. You get some GMs who lament this fact, complaining about how their carefully crafted masterpiece is wrecked by the players who don’t respect their brilliant plans.
This is, frankly, so much bullshit. If a GM’s plot is so inflexible that it can’t bend to accommodate players being living, breathing people, that isn’t a plot for use in RPGs; it’s the plot of a novel, and the GM should go write it. Any plot should be able to bend to some degree, at least enough that if players go west instead of north, the plot turns out to be on the west road instead of the north road. Unless there’s some deep metagame reason for it, the Wicked Wizard of the Northern Wastes can easily be the Wicked Wizard of the Western Marshes or whatever.
Of course, this is just the basic level of flexibility a plot needs to survive contact with players, and it’s still easy for players to break it. Your plot calls for them to fight the Wicked Wizards minions to the death, but they take the first patrol captive and want to use social skills to convert them to allies, or they decide the Wicked Wizard sounds like a decent employer who might be willing to pay adventurers to adventure for him, or some similar thing that hares off at an angle from the expected course of action.
Quite a few GMs will knee-jerk respond with, “You can’t do that!” Why not? Because they didn’t prepare for it. Honestly, those GMs have my sympathies, but that’s it. There’s no reason they can’t respond instead with, “Okay. I wasn’t expecting that. Let’s take a ten minute break while I figure out what to do.” Then take those ten minutes and figure out, quickly, a rough idea of what will happen from that course of action. It doesn’t have to be anything complex or deep, just solid enough to let you keep moving things forward. Maybe swap the motivations and desires of the original good guy faction over to the Wicked Wizard, or have the minions be press-ganged into service and all too willing to defect – or at least crafty enough to seem willing to defect.
Then there are those players. The ones who hear about the Wicked Wizard and decide they want their character to be the estranged child of the Wizard, when part of what you had planned was for the Wizard to be seeking a partner so as to have an heir; or they’re a former minion of the Wizard turned against them, despite the fanatical loyalty of the Wizard’s minions. Or the character is a former slave determined to free all of their people from any bondage to anyone other than their own species including simple loyalty.
At first glance these ideas seem like they completely wreck your plot, but they’re an opportunity to make it stronger and to make it personal for the players. Why is the child of the Wizard not the heir? Does the Wizard know they exist? Were they born under the auspices of some mystical sign that makes them ill-suited to be the heir? Did the former minion turn before the Wizard perfected whatever ensures the loyalty of the remaining minions? Are they still partly hampered by an incomplete loyalty spell? Do they have family who do serve the Wizard loyally, and how will that family deal with the renegade coming home this way? What about the former slave? What if the minions don’t want freed from their service? What if they try to convert the escaped slave to their cause? What if the Wizard is one of the ex-slave’s race, disguised by magic?
Draw the players in like this and your story gets stronger, and gives the players a measure of authorship in it that will have them looking forward to seeing how they’ll get to impact the world next. Let them write the legends of their characters and build them into your plot – not as decorations, but as the underlying structure of it.
You won’t regret it.