He had ideas about Kingdom Hearts II when making KH1, and that's where Another Side, Another Story comes in.
These were fleshed out during KHII's development, and CoM was initially not going to be made (the year between 1 and II then being unexplained), but wound up being made anyway, with the foresight of KHII's plot available to inform CoM's plot.
After KHII, obviously he had ideas for BbS, probably more concrete than the ideas from ASAS, and in BbS, he was thinking of DDD
Days, like CoM, wasn't gonna happen, and when it did, Nomura let Kanemaki write the story and Kanemaki introduced Xion (a central character) during development of the game.
I actually don't know too much about the development of coded.
As for χ[chi], he likely had ideas for this story during DDD (having launched just a year after DDD's release), and wrote its scenario in tandem with KHIII's.
So I would expect the χ series, 0.2 and KHIII to have the same narrative relationship as CoM and KHII.
In a way, it isn't actually inaccurate to say that Nomura "makes it up as he goes along," but it definitely doesn't happen the way that phrase implies.
There was also an interview somewhere, I think, where he claimed to think two games ahead, but I'm fairly certain this is more in the "ideas" sense rather than "plot sense."
I think years ago he said that he already had the ending of the saga planned out, and that from that point it was only a matter of getting to that ending.
Specifically, he pitched coded while he was drunk with coworkers.
They hatched some ideas about the game during that pitch but I'm positive he had already had the base concept in mind.