They have evolutions and captures set up to match what Pokemon appear in the movie, like Happiny hatched 2 episodes before the 10th Movie came out. They probably have where they're going after the main region planned out in advanced as well.
From there, things probably get changed, like maybe the original plan was for Ash to catch Aipom, trade it to the female protagonist of DP, and have it evolve. The "releasing" thing probably came later when they decided to have Dawn catch Swinb and evolve it into Mamoswine, and maybe they didn't want to have a full team of six since they still can't handle screentime for Ash's 6/7 Pokemon all that well (they're better but its still not perfect).
I guess next year at this time, we'll be in the filler arc, and by then I guess the writers will have the end of Sinnoh already mapped out and the first few dozen episodes of the 5th Gen ready for Fall 2011 to coincide with the new handheld, which will probably be released with the 5th Gen games.