chargie is one solution for platforms where support is available
Basically, I want the phone to ignore that there is a battery until the battery charge drops to about 20 percent and then charge to to about 60 or 80 percent but don't use the battery at all. Only use the battery as a power source if the user switches off this dedicated mode or if the user powers on the device without external power present. Something like that.
Librem 5 has this functionality: https://forums.puri.sm/t/how-to-limit-battery-charge-voltage...
Caveat though. Reports of spicy pillows are increasing as the age of the device gets closer to more than a year. They may or may not be using that feature.