You can of course plan the big lines of the campaign, but the more precise you get and far ahead of the present, the more you will either lose or railroad to not lose. Both suck
I always over plan things. I'll plan encounters appropriate to level. I'll plan NPCs. I'll plan dungeon themes. But I won't plan a dungeon themed encounter unless I know they're heading into that dungeon because it's where we ended the last session.
To put it another way: I never plan so specifically that a thing can't be moved to another place unless I'm positive it's coming next.
I always over plan things. I'll plan encounters appropriate to level. I'll plan NPCs. I'll plan dungeon themes. But I won't plan a dungeon themed encounter unless I know they're heading into that dungeon because it's where we ended the last session.
To put it another way: I never plan so specifically that a thing can't be moved to another place unless I'm positive it's coming next.