And it's easy to keep them at around 100%. For instance: For a nominal 12v battery, one can very nearly just feed it 13.8v (plus or minus some temperature compensation) and have results that are actually pretty good and close-enough to 100%.
And when things go very wrong, lead acid batteries tend not to catch on fire.
It's a natural fit for UPS duty.
The lithium batteries in cell phones are a different thing. They hate being at 100% SoC and degrade fairly quickly in that state.
They can be pretty happy at around 50% SoC, but it's hard to actually keep them there because of the way the voltage ramps [don't] work with lithium chemistries: It's almost flat through the middle of the curve.
And cell phones don't let us do that anyway: It'd be great if there was a "Compute mode: Just do your best to keep this battery near 50%" setting to click on, but there is not. (And we could hack that in, except: We don't own our phones.)
And when things go wrong, they can become exothermic in ways that are not exactly ideal for an unattended device sitting on a shelf.
It's only solving part of the problem though: Sure, it can keep the charge at around a self-reported 50%. But the device itself doesn't necessarily have a good idea of what 50% even means, especially as the months and years tick by and cells age, unless it is allowed go closer to the extremes (closer to 0 and closer to 100, sometimes).
The reasons for this get weird. Near the edges of the curves (0 and 100), the BMS can use voltages to figure out where things are. This works well.
In the middle of the curve, voltages are damn near flat and cease to be an indicator of state-of-charge, so the BMS counts coulombs instead. This works too (for awhile).
Except they're not ideal batteries. They age even if they're not being used at all, and shit happens just as it does for any other non-ideal entity. So on a long-enough timeline, even a perfect coulomb counter doesn't necessarily have any way to accurately report state of charge.
The way that this problem is dealt with on a phone that actually gets used like phones get used is that the BMS can reset the coulomb counter during the peaks and dips of a normal charge cycle, based on voltage.
But charge cycling doesn't happen even with a Chargie-equipped phone sitting on a shelf and running Docker containers, does it?
For people that didn't know, this is probably the fastest and riskiest way to destroy your battery quickly
Overall though, it would probably make the most sense to physically remove the battery from any phone used as a dedicated webserver, and then have it connected to an external UPS instead.
And yes, agreed absolutely: It safer to pull the battery, and not particularly difficult or detrimental to do so for the kinds of applications I'm envisioning here that involve a disused phone doing server-ish stuff.
I dedicated an Nvidia shield K1 to be a Sonos interface. Just mounted it to a monitor arm and left it plugged in for something like four years. The mount was this beefy metal thing, a little steel cage for the tablet, but as soon as I unscrewed it enough to remove the tablet from the mount the tablet undramatically exploded. It ballooned to a width that was thrice the original thickness of the tablet, pushed the plastic apart, and it was clear that the case was never going to come back together again. I was afraid to touch it, lest it rupture.
It seems like it would only be a terrible idea beyond a certain scale. The pillowing battery is just assisted disassembly. And now it's easy to get the battery out.
Although swapping battery of ups is surprisingly easy. Buy a new one from online store with a few dollar. Disconnect the connection to old battery.(a REALLY important step). Remove old one. Slap the new one in. Connect the wire. And pre-charge it for a few hours. Then it can just go back online like a new one.
(absolutely not an expert, though, this is why I asked for experiences :-))