There are a few things going on here:
Best way to look after the battery
Neither the action of unplugging when it reaches 100%, nor the action of keeping it charged all the time are the right way to look after the battery.
There are a lot of best practices detailed on Apple's Battery website.
In summary however as you can now see doing nothing actually would have been better which is why I usually advise people:
- Use it however you want.
- Avoid leaving it plugged in all the time.
- Never leave it for extended periods at or near 0%.
- If you don't use it for 30 days, make sure to cycle the battery.
Battery service versus device replacement
I think you've already answered the question yourself here, however in summary:
The cost of battery replacement isn't going to be more than the cost of a new laptop, and the laptop was already bought at a significant discount.
The performance of the laptop is still more than adequate for the tasks you have so there is no need to upgrade.
Ignoring the financial reasons, environmentally replacing a laptop because the battery has failed is not great.
So, replace the battery and revisit this question in another 2-3 years, if you want something a bit more fresh in the mean time, reinstall macOS, set a new wallpaper, or buy a new case.
Should I replace the battery myself?
Replacing the battery yourself is definitely an option, it depends on whether you want to save money, how easy it is to get to an Apple Service Provider, etc...
If you go with battery replacement I would go with a reputable battery supplier like iFixIt as suggested in the comments above.
Personally I'd suggest that if you are already considering replacing the laptop then cost probably isn't the major consideration and maybe getting Apple or an Apple Authorised Service Provider to do it might be preferable for you.
Apple's Battery Service Price List
What if I keep using the battery?
In order of most to least likely:
- Likely - The laptop won't stay switched on at all when the battery is unplugged.
- Possible - The battery begins to expand bending the chasis.
- Unlikely - The battery expansion damages internal components breaking the laptop.
- Extremely unlikely - The battery is damaged and begins runaway overheating that causes a fire that destorys the computer and risks a house fire, major injury or death(s).
Again I can't understate how unlikely the battery fire is from this but it can and does happen with this type of battery technology.
If you plan to continue using the laptop you should replace the battery, but I'd not worry about it too much, just keep an eye out for battery expansion causing the battery to bend the chasis as that will be an expensive repair.