I whipped this up really fast.
How to use:
In the Data folder, replace the Scripts.rxdata file with the attached one.
There's a bug where if a trainer only has one pokemon, they will send out one pokemon and there will be one visible and one "phantom" pokemon that both attack, but you only need to beat the visible one to end the battle. This makes the first few rival fights basically impossible to win, and will possibly make some of the later ones more difficult. (I haven't reached that far so I can't say.)
It probably will not work when E19 drops because it edits the entire scripts file. The RPG maker scripts that I edited were the pokemontrainers and PokeBattle_Battle, so if anyone knows how to mod it without having to replace the entire file let me know.
Scripts.rxdata