Wild battles DO store the outcome.
For example if I need to know if this certain pokémon was captured or not:
pbWildBattle(PBSpecies::MANECTRIC,45,37,true,false)
#will store the battle outcome to variable 37
Conditional branch: if Variable 37 == 4 #the pkm was captured
Conditional branch: if Variable 37 == 2 #the player won the battle
Conditional branch: if Variable 37 == 3 #Player or wild Pokémon ran from battle, or player forfeited the match
Just have a look at how the method pbwildbattle works:
def pbWildBattle(species,level,variable=nil,canescape=true,canlose=false)
Of course it doesn't work for every wild battle, just the scripted ones, but if in your game your rival is close enough to comment on the battle outcome I believe this is a scripted event.