Swelling is a hit or miss failure, typically on the older models, it comes from people, just like their phone, leaving it plugged in regularly, well beyond 100%. Technically speaking, the consortium of rechargeable battery MFG'ers would have you only discharge/charge 20%/80% respectively, but that's a bit too anal. If you can't reliably be there to unplug it when it hits 100%, then don't leave it plugged in. Lots of people leave their laptop plugged in 24/7 and the swelling doesn't happen, but that a chemical crap-shoot. We REGULARLY collect the "Box of Shame" varying degrees of bloated batteries. On cheaper laptops, mostly plastic trackpads, it's true, it could cause permanent damage, but in the MacBook products, we have NEVER seen it...they are just better build materials. We have seen then no depress at all, just like any laptop with a swollen battery, even convex curvature of the bottom plate or trackpad. The swollen batteries are 100% a fire hazard, as they are filled with death gasses, the decomposition of the chemicals, which increases the possibility of the anode/cathode in any given cell, of sorting out...if you get a Li-ion fire, good luck in putting that out with a standard extinguisher. In the end, swelling or not, even with perfect charging practices, most rechargeable batteries have a useful "average" life of "about" 4 years, after that, it is diminishing returns. Once a model is label by Apple as "Vintage" they will not longer carry parts or service...I suspect this will happen with yours, 2024 or sooner. Keep in mind, with the Apple Silicon out, support for macOS/Intel is on the chopping block, doubt they'll support new versions for even the newer years 2018, 2019 beyond 2025, other than maybe the $$$ Mac Pro models for a bit longer.
I can assure you - there is no planned obsolescence of these batteries, and with proper charging habits, NO ONE that got a computer with a new OEM battery, should be seeing "Replace Battery" messages any sooner than 500 cycles at a minimum. The key is the charging habits, most people fail here.
The newer models do have different charging circuits, similar to an EV vehicle, so less prone to over charge burn out death. Batteries are like muscles, you have to use them, and over charged regularly battery will die sooner, just like a battery that is charged only a few times, then a couple years of no use/regular charging, each can bring battery failure, those chemical are depleting while being used, charging, even sitting idle.
But as long as your unit is in great shape, other than the battery, replacing the battery can still be worthy, in maintaining your investment.
Once you can no longer get a viable/contemporary Web Browser, to keep up with the changing landscape of WWW security updates, functionality, it will mostly be EOL for any computer, other the local used applications.
Find a reputable shop, doesn't have to be Apple, though they might all be "about the same" and getting switched out and start to enjoy again, or you can run it into the ground always tethered to the charger, and save your money for one of the newer machines in a couple of years. ?