I did something like this for my project. There were multiple levels to it. For exemple:
1st level is the broad story. Where does it begin, where does it finish, what important events should happen to make it go along. Who are the main characters, protagonists, antagonists, etc. Does your game have a theme? Is there a specific question you want to explore with it? This is a narrative thing. Don't bother too much with the game format for now. You might as well be preparing to write a book at this point.
2nd level is separating it into smaller chapters. Where does each chapter start in the bigger story, what events should happen to get me to the plot twist/revelation/progression at the end of the chapter. This is still mostly a narrative thing but allows you to somewhat measure the length of your game and gives you a first idea of difficulty/power progression during your story. But you still might as well be preparing to write a book or a movie at this point. You are merely subdivising your large story in meaningful arcs.
3rd level is splitting each chapter into actual RPG format. So we're still working with the narrative but we are distributing it along more mechanical game elements. How many dungeons do I want in each chapter? For someone who did most stuff without skipping battles, what level should they be at the end of each chapter & at the end of the game? What would the maximum level be for an hardcore completionnist? What would be the bare minimum be? What about gear/skill power level? How many dungeons/quests should there be in each chapter, what should the pacing be? Should it feel light and breezy, long and drawn out, fast & furious, densely packed...? What events do I need to happen in this chapter to get the plot along for the initial situation to the end I planned for it? What mechanics do I want to introduce when? etc.
4th level is planning the dungeons/quests. It is mostly mechanic as the narrative elements have already been assigned to it. Which specific events are tied with this particular dungeon and how do I make them interesting/noticeable? What is the dungeon's place in the bigger picture and why is it relevant in the story? How does it forward the narrative? How is it interesting and/or necessary? Where does it happen? Who should the boss be? What kind of enemy should the party encounter? Each dungeon/quest should have a well defined purpose in the narrative/gameplay. Each dungeon/quest should have something interesting about it. And yes, sometimes the purpose will be to feel long and drawn out, because you want to convey something like that in your story, about how achieving something was long and bothersome. Mechanically, what approximate level should the party be when starting it, what level should they be for the boss, and what level should they be at the end? How much XP should I sprinkle in the dungeon for that? How many encounters should that be, approximately, knowing that it should usually be a little more than in the previous dungeon? How do I make sure that someone who skipped as many encounters as possible still has the bare minimum level for the next dungeon? What gear/skill power level do I want to gift the players with in this dungeon? What should the difficulty level be, knowing what the bare minimum level is and the absolute max level is at this point? How big should the dungeon be approximately, in screens and/or steps, knowing what density you want for this particular dungeon?
Planning my game in this format allows me to craft an interesting story, pace it and transform it in game format. Sometimes I'll realize that awesome factory dungeon idea I had would work better a little later in the game plot-wise, or that I need to introduce that specific character in a specific dungeon because it is at a specific point in the game, which changes the boss I had originally imagined, or that this filler cave dungeon doesn't really forward the plot in any meaningful way, messes up the experience progression and should just be dropped/shortened.
So in conclusion, the general idea is that dungeons/quests are the bones of your game, imho. They should all have a purpose mechanically and narratively and be finely designed to achieve it.
This article is a great read on pacing and subdividing your game, go check it out if you never read it!