The AI... isn't really that good, actually. In Pokemon games, you're always using super effective moves against every trainer in the game. In fact, doing that will bring you through the game right away!
Even if one part seems unbeatable (I REALLY doubt this, but it can happen if you use repel on every one of your steps and dodge every trainer), strategy can still be used to win the game. Or just plain grinding at your nearest high-level wild pokemon point.
For an example of how how abusable the level of AI is, check Kaizo Pokemon. For anyone who does not know what's this, its basically a rom hacking Pokemon Emerald to be as hard as the Mario series of the same name (Kaizo Mario World). Probably by the same creator, though.
http://www.nicovideo.jp/watch/sm4388040And, if you haven't, you should watch it. It's entertaining and epic. Like the Mario series.