Its amazing how dumb most charging is for smart devices. I plug my phone in every night and it does a quick charge then sits there and does nothing the rest of the night. It even knows my alarm clock time, surely it should be smart enough to slowly charge all night.
iPhones will selectively delay charging past 80% if you're at home and if your usage history indicates that the phone will be left on the charger for a while longer. https://support.apple.com/en-us/HT210512
That seems to me to be quite unfriendly to privacy. And given that I always charge my phone overnight and use my phone’s alarm function, it could simply use that as the target time to finish charging to 100%. No complicated location-based ML needed.