I'm curious, is it possible to create fake 'batteries' for devices that pass the current directly from the charger into the device? I'm imagining something that looks like a battery, but doesn't hold any charge so people can use their old phones exactly as you do and never have to worry about it pillowing.
I can see a market for something like that, albeit a very small one since it would be device specific. I'd buy one if it existed.
Still, though, a correctly set voltage regulator with a normal USB plug and a few easy solder joints to attach the device's battery connectors to would already make the process quite a lot easier.
For example, want to mains-power your Panasonic digital camera? [1] provides mains power in a battery form-factor. Just what you need for long term time-lapse photography.
Does it just give some buffer for the PSU in those high load situations?
I forgot to mention this, but the phone has also been loaded with LineageOS to get rid of a lot of the default crap that was on there. It boots way faster and IP Webcam seems to run more reliably this way!
I've done this before with an old LG phone, and it seems that leaving the battery in the phone for camera purposes is a bad idea. It turns in to a spicy pillow within a year. I believe it's the heat - from getting cooked in the sun through the window, from the CPU working hard to encode MJPEG stream, and from the wireless radio constantly transmitting that stream, all while being held near maximum SOC..
So what I did this time around was remove the battery completely! I found an old 5V USB phone charger, say 1000mA output, and used a diode to drop the voltage to ~4.2V or so. Nothing out of the usual for a phone to see soldered on it's battery terminals.
Now this worked, but I found that certain high-load situations would cause the phone to power off. Solution was to add say 5000uF of electrolytic capacitors to the output of my new power supply.
With that added, setting Android to sync automatically via my NTP server with a command through the ADB shell, setting it to always connect to my IoT VLAN WiFi, and setting IP Webcam to start after boot, this solution has been working perfectly for quite some time!
It was a fun project too, and I got to reuse an old phone, and old charger I never would have used again, and some random capacitors that have been rolling around in a parts box for years. :)
Bonus: I control the camera's "night vision" mode via Home Assistant automations (turn on/off around sunset/rise) through the JSON API the app provides. This also provides some sensors like temperature, etc. The video stream is fed to ZoneMinder, which HA streams from. Motion detection in ZM triggers object detection via HA, and I get reliable notifications while I'm away!