Takeshi Shudo was the head writer for the first three seasons of the Pokemon anime, as well as the screenwriter for the first three Pokemon movies. While many of the episodes Shudo oversaw were filled with messages about the bonds of friendship, Shudo apparently had a dark ending in mind for the Pokemon franchise.
A recently translated blog post written a year before Shudo died in 2010 hinted that Shudo wanted to end the show with Ash (Satoshi in the Japanese anime) as an old man and revealing that his Pokemon adventures were all a figment of his imagination. "Months and years having passed, Satoshi, who has become an old man, suddenly remembers the old days," the translated blog post says. "It is an embellished memory of childhood. A fantasy…The imaginary creatures, Pokémon, and their adventure. Friendship. Coexistence. That is, in the real human world, something Satoshi could not possibly encounter. However, somewhere in childhood, surely Pikachu and the other Pokémon are there, Musashi (Jessie) and Kojiro (James) are there, Mewtwo is there…"
According to the blog post, which was translated by Redditor NAveryW, the show would end with the elderly Ash imagining going off on a final Pokemon adventure of self-discovery and co-existence.
While this ending seems like a bit of a downer, it should be noted that Shudo had some very strange ideas about the Pokemon franchise. Shudo once wrote another blogpost about a proposed fourth movie in which Pikachu became a revolutionary and helped lead his Pokemon brethren out of captivity and ended with Ash and Pikachu fighting each other. Clearly, that idea never came to pass and it's likely that if the Pokemon anime ever ended, it won't be on the bummer note proposed by Shudo.