Both times that the battery swelled up previously, the laptop was still under warranty. Apple wasn't going to hand me a new battery to install myself; I had no choice but to let them install it if I were to have it covered.
Now the laptop is out of warranty. If it were to fail now, I could in theory buy a battery replacement kit from iFixit, and muck around with adhesive removers and many delicate parts and hope I don't break anything else in the hours-long process: https://www.ifixit.com/Guide/MacBook+Pro+13-Inch+Function+Ke...
That's a fairly user-hostile situation, though. There's a reason Apple doesn't advertise the battery as user-serviceable, in contrast to some other manufacturers.