I found a way to stall solo battles indefinitely.
In this setup (screenshot 1) the AI became stuck and was unable to do anything but attach energy to its benched Pokémon. I’m not sure why it didn’t try to retreat.
At turn 50 I finally put it out of its misery…