When did Pokémon start to decline as a brand? And in what sense? Like popularity or financially or just creatively?
There's a couple of points where one could argue the games in this franchise jumped the shark; with the main ones being the release of Pokemon X and Y, and Pokemon GO. The former has to do with the lackluster reception Pokemon Black and White, as well as their sequels, had received; as they represent the last time GameFreak put significant effort into the plot of the games and the gameplay. With X and Y, they decided to instead focus on the shift from sprites to 3D as a selling point, and were rewarded with slightly higher sales figures, and significantly better critical reception.
As for Pokemon GO; so little effort went into developing that game, that it's rumored The Pokemon Company began to question GameFreak's role in the franchise, once the utterly insane sales figures for Niantic's product started coming in. After all; why keep having them make mainline Pokemon games, when a low-effort and cheap-to-produce mobile game manage to eclipse the profits of every single game ever developed by GameFreak to this day, combined. This has likely led to GameFreak cutting corners wherever possible; either because they feel like they're about to be displaced from their position in producing games the franchise they created (and are thus putting the majority of their effort into attempting to rebuild their reputation as a games developer, as opposed to a Pokemon games developer), or because they've taken the lessons learned from Pokemon GO to heart, and simply no longer feel the need to try anymore.
Pokemon hasn't really been hurting in the popularity department, but there's just no incentive to create games that have anywhere close to the quality this franchise was once know for; not when the customer is clearly willing to settle for far, far less. There's also an argument to be made that GameFreak never had much skill as a developer to begin with; and as they keep having to make games for more advanced hardware, their incompetence as programmers and designers becomes more obvious.