You can do most writing and animation work on a movie without knowing exactly which Pokemon you'll have available to use for a quick 2-minute scene. They supposedly start working on the next movie right after they finish the previous one, so it takes them about a year to make them.
If you mean the animation, sure, but the stories for certain movies (Movie 4, Movie 8, and the Diamond and Pearl Trilogy) were in process long before then.
You're right about the Pokemon, though. Since Ash has the same Core Team every region its easy to say that " fire Pokemon melted this object with Flamethrower " because Ash will almost always have a Fire Type Pokemon in his possession by time the first regional movie comes out. You don't really have to know what the Pokemon is to pencil it into an early draft of the script.
There's also a difference between "planning episodes" and "having a rough outline of which very general plot points will happen in which order". They can easily have BW100-105 summarized as "Mijumaru evolves around this point" long in advance. Team layouts and the like are no doubt decided on long in advance, then plot points are solidified more as they get closer to these points.
I explained the difference, but I guess I explained it poorly. I didn't want to make a bigger wall of text then usual but got a little lazy.
When I say that they make the outline I imagine something like this:
- Ash heads to the New Region
- Ash meets his Rival at the Professor Lab
- Ash captures a flying Pokemon
- Ash captures the water Pokemon
- Ash is joined by a female companion
- Ash captures the grass Pokemon
- Ash captures the fire Pokemon
- Ash battles the first Gym Leader
- Ash evolves a Pokemon here
... as an example of something they'd do as a rough outline months in advance without necessarily knowing what characters will join Ash on their journey or what the Pokemon Ash might be catching would look like. Then, as the designs come in, the writers might adjust the outline and begin thinking of episodes for the characters further down the outline.
For example, they decide that they like the design for Oshawott and want to use him. At this point they pencil in Oshawott as Ash's Water Pokemon and think for episodes for him down the road like the Lost Scallop one. They decide to have Ash meet his future Oshawott at the Professor's lab. Around this time they review all of the Grass Type Pokemon in Generation V and decide to give him Snivy, but leave his Fire and Flying Types still pending.
As the writers begin reviewing the designs and picking out what they like they begin rewriting the outline based on what they've chosen so far:
- Ash heads to the New Region
- Ash meets Oshawott in the Professor Lab
- Ash meets his Rival at the Professor Lab
- Ash captures a flying Pokemon
- Ash is joined by a female companion
- Ash captures Oshawott
- Ash captures the fire Pokemon
- Ash captures the Snivy
- Ash battles the first Gym Leader
- The Gym Leader Cilian decides to join Ash
- Ash receives a Pokemon egg
... and so on and so forth until they're satisfied with the flow of events.
Of course the outline isn't concrete even after production of the current region begins. They keep working at it as the series progresses based on the fan's reactions to the Pokemon and the characters. Maybe they'll give a popular Pokemon to a character. Maybe they'll make an unpopular character appear less. Maybe they'll make a popular character appear more. Ect.