As is obvious, this episode is the continuation of the story presented in the episodes Electric Shock Showdown and Pika and Goliath, both of which presented Pikachu with a challenging Raichu opponent, and the option to Evolve. The idea to do such an episode came to my mind when I was trying to think of ways to use Mega Raichu in the story. I realized that Mega Raichu could step up the story entirely. I did have one problem though. I am against the idea of having random trainers use Mega Evolutions, so I didn’t want some random character of the day to be using this Mega Raichu. Initially I considered having this be a rematch with Lt. Surge, but decided against that. Then I realized how perfect Ritchie could be for this. He’s a great choice for a trainer who can Mega Evolve, as he was shown to have a deep bond with his Pokémon. Also, him defeating Ash and Pikachu would mean a lot more than just some random trainer with a Raichu would. So I made the call to have Ritchie Evolve Sparky, which also served as an additional reason for Ash and Pikachu to reconsider their decision of not Evolving. The rest of the episode pretty much wrote itself from there.
One other interesting thing worth talking about is the origin of Mega Raichu. It actually has a history hearkening back to the first ever Pokémon I created. One day as a young child I was watching an episode of Pokémon. It occurred to me that Pikachu really deserved to Evolve. I had yet to see the Electric Shock Showdown episode, and didn’t even know that Raichu existed. So I decided to design Pikachu’s Evolution myself. So I took out some crayons and paper and created what I dubbed Megachu, the Evolution of Pikachu. It was this creation that would inspire me to eventually create an entire region and game concepts, which would eventually turn into Cosmic Quest. Eventually I did learn about Raichu’s existence, but since Megachu was the first ever Pokémon I created, I couldn’t let go of it, so I made it instead an Evolution of Raichu. Now at this time I did not know about Pichu. Once I learned about Pichu I was stubborn enough to say that Pikachu is so special that it gets to have four Pokémon in its Evolution line. Of course, as time went on I dropped the concept of Megachu entirely. But then X and Y introduced Mega Evolution. Not only was it technically a fourth stage of Evolution, but it even had Mega in the name. It was perfect. So Megachu was reincarnated as Mega Raichu.