I'm not talking about connecting a budget battery to the bike.
I meant some way of using a budget battery to recharge an official branded battery.
Even if you could connect the two batteries together, there's still no way of transferring the charge instantly.
The OP wants to flatten battery number one, stop for a few seconds to instal battery number two, them continue.
You could use (say) 25 W of spare leg power to do it on the flat for long periods of time and get that back for short boosts on climbs. You could also use the generator as a brake rather than converting all your kinetic energy into heat when stopping.
It takes several hours at mains (rectified) current to charge the battery.
The amount of charge you could recover by taking a small amount of leg power and while braking is miniscule.
The inefficiency of the charging process also works against you, it takes more power to recharge a battery than the battery is able to harvest.
Look at it like a bike dynamo.
For a small amount of resistance it's possible to run an LED bulb or two.
To produce enough charge to meaningfully charge a battery would make the bike feel like it was permanently on a steep gradient, which rather defeats the object.