Okay, I understand there is a ridiculous amount of information to account for when programming a battle AI. Seasoned players make mistakes on occasion. I admit I'm not a coder and I don't know how large modern AI structure is, or how feasible it is to increase it. But I feel that at least reacting to new developments in a battle should be something the AI should be regularly capable of.
From my perspective (as a novice game coder, and novice game designer), AI like that it would probably be more effort than is warranted to make an AI that tries to account for every type of move fail possibility. This is because most of them have different errors due to different logic flows.
AI in games can be expressed in many ways. Modern game engines are powerful.
It can be as simple as having a raycast that the player walks into to turn aggro, -> randomize attacking on timers, -> having certain attacks lead to others, -> having a guaranteed lead attack... But ultimately, all of that isn't too hard. A lot of more action-y games do not have super complex AI, and instead use well-designed attacks and enemies with several of them to account for more scenarios. "If the player leaves the close-range raycast/hitbox, use (attack meant to close the gap") is fairly simple logic, after all.
It can get as complex as Rain World. But Rain World's AI, while very complex, is still not absurd to code as individual creatures. Rain World creates a believable ecosystem by assigning many variables that essentially mimics a food web, and then assigns enemies random personality types/attributes to spice it up. Have some give up on chasing other enemies for food quicker, and have these enemies be territorial with each other.
It's also a game where most of the point is this ecosystem, so it makes sense to put all of this time in.
Let's look at JRPGs rather than action games. Turn-based JRPGs often go with the approach of either hard-coding attacks, or having few attacks pulled at random. An Octopath 2 boss enemy will have 3ish attacks that are pulled over and over. Maybe there will be another factor, too, like if it has minions and they are killed, on x amount of turns they will be revived. But overall because of the fewer variables, making these bosses tough is usually more about if the player can win the numbers game. Getting damage on them and being able to heal off the damage with enough mana to survive long-term. Strategy comes into play with status/buffsdebuffs and resource management.
Pokemon is fucking weird. Because it's a battle system that's been expanded in a matter of directions for ages.
Let's look at a similarly long-running turn-based JRPG series: Shin Megami Tensei, and the main-series Persona (/j). While it's lasted as long as Pokemon, it's still more like the other JRPG game example I used. The systems are not that dissimilar with the SMT JRPGs from the 90s, and they didn't add hundreds of moves or abilities. SMT games moreso shake up the combat by having certain features come back or not come back, such as demon negotiation, or how Press-Turn is expressed.
But there is no "We added 30 new status moves and half of them do wildly different things." every few years. And the boss fights are basically just 3ish attacks they play at random/are hardcoded to go into patterns for.
Pokemon is weird because it is not based on the traditional way to make JRPGs work as singleplayer titles, because it's not designed around you having multiple party members out against a boss. In Pokemon if your Pokemon one shots 6 Pokemon in a row, that is the fight. And that is not that unreasonable, either. Except for Totems, which is kinda why they are good.
Coding AI that isn't just cheating and also accounts for so many variables and new information and checks would be a pain in the ass, and have so many errors. It'd have to follow logic flows that could mess up with any number of other variables.
It'd take a long time, a lot of QA, and ultimately it would not be appreciated by a lot of players. Hell, it might even make it worse at times, killing cooler strategies or making new players struggle harder. While some may feel the closer to human play would be cooler and make for a fun challenge, and I agree to an extent (love Radical Red), the average player appeal to Pokemon is kind of like...
"Kirby JRPG" with, of course, catching.
I remember having my younger brother try LGPE when he was 12. He loved it because of the smaller dex helping him keep types in his head, no abilities to remember, and the catching element felt more involved. He beat it (with some help from me).
I let him play SWSH and he never got past the second gym. It was hard for him to remember all of these new Pokemon's types, the Dynamax mechanic was not well-explained and not a mechanic he had to use much. So many new moves, abilities he had no clue about, etc. It became a point where he decided to just try to grind in the Wild Area to overlevel instead of trying to get a type advantage on Nessa.
This could be solved with difficulty modes, but we all know Game Freak's philosophy on choices. Which since I'm nerding out for a sec, I have to say is really not just Game Freak. While Nintendo and Game Freak are not the same company, they both have had this philosophy for a while that less options is better. They try to make it so that one polished experience is what every player gets with minimal deviance, so they know what experience it will be exactly. Also cuts down on QA.
They didn't have to cut Switch/Set from SV but that's probably why.
Anywho, if you want to understand more about game design and why things are the way they are, and this is not easy for everyone — find the target demographic and have them play it. See where they struggle, where they succeed, and what makes them want to play or not play. The LGPE catching mechanic was a huge win for my brother because he did not find the turn-based combat consistent due to his lack of knowledge, and it felt more involved to use physical actions to play.
The last area where more in-depth AI would be cool is the Battle Facilities but let's be honest, it's clear that Game Freak is on their way to kind of just moving past them. Legends Arceus had an update that added one, but LA battle mechanics kinda suck so... And I think the intention of Mastery was more similar to LFPE's post-game 1v1s. The same team made both games after all.
Scarlet/Violet didn't really add one even through DLC.
If I'm wrong though and that's just an SV moment, then it could maybe be worth developing that AI for it even if it was a niche side feature (that's what Battle Facilities are, the vast majority of players who beat the game will just stop playing or make a new save file), but generally the AI cheating or having hard-coding for specific strategies is probably a way easier solution + on top of the AI having well, good teams.
Long rant to basically say: Nothing is impossible but it's probably more worth the effort to just not do it, or have the AI cheat. AI in general is not usually made to be that complex unless the AI being complex is a major component of the game, and that is not usually the case, and not the case in Pokemon. Usually giving the AI options that are good to use with fewer checks, but usually better results is going to make for better fights for all players.
I'd first suggest them giving enemy AI better Pokemon and stats before trying to do all of that, because it'd probably lead to a much better result.