There is a problem with a storyline where the BBEG must do three things to win.
When the PCs go to stop the first thing, they will either succeed or fail. If the succeed in stopping it, the plot either ends, or the BBEG finds a work around. If they find a work around, then it negates the prior victory by the PCs, making them feel like their success did not matter in the long run. That type of railroading does not go over very well. If they fail in their attempt to stop the adversary, the story can continue - but that usually requires either the DM stacking the deck against the PCs, or relying upon them getting unlucky. Neither of which is terribly great.
The three variants on this that I still use are:
* Three tasks must be achieved, but they can be done in any order, and it is pretty much impossible to destroy the artifacts used in this endeavor. Thus, it becomes a battle of the PCs to 'keep away' the items necessary to achieve the BBEG's goals. In a repeated game where the BBEG attempts over and over to go after those artifacts, they will eventually win. Critical Role, Campaign 2, features an element like this ....
* I use this one, but it is still a bit problematic. When the PCs start on their quest to stop the three elements, 2 are already completed, but they do not know it. The BBEG is hiding that these steps have been completed because they are stumped on how to do the third thing, and they think that super smart PC may be the one to figure out the puzzle by repeating their steps on the first few segments.
* The BBEG tricks the PCs into doing their dirty work. The PCs believe they're going to destroy Levistus right before he is freed by completing the three acts. However, that releases him. Maintaining that type of deception, especially at high levels, is hard given the magic available to PCs, but I have a few tricks in my campaign world that give the BBEG an edge on this type of thing when I fold artifacts into the plot (Artifacts are immune to normal magics, including divinations; there is an order like the Illuminati that exists only to keep artifacts hidden away - they prevent any legends from being known about artifacts and relics (which stops Legend Lore as I deem this to make the items not of legend-ary importance); Gods and their minions are forbidden from discussing artifacts; etc...). By establishing that artifacts are immune to most normal methods of magical inquiry, it gives me the tools to keep it a mystery while still allowing these magics to solve other problems.