but should also renew automatically if it has run out, and the user then buys a product on the site.
I'm sorry I'm not understanding what you mean by this. So they manually subscribe to Plan A, but if they buy Plan B (a product) then that also renews Plan A? Is that what you're trying to accomplish?
joomla_onAfterPaymentSuccess would be a Joomla event. So I've no clue what that extension that event even is for. I couldn't tell you what happens during that event.
I do not know if the last condition allready is changeed when the trigger for the auto action fires ? Then it is worthless.
The subscription conditions in CB Auto Actions are live checks. So it will check in the very moment that condition is ran the subscription status.