I’m the spirit of fairness I will nitpick you.
Firstly, porting apps over between Android devices works seamlessly only if those apps come from the Play Store. Android has no provisions for auto-transferring e.g. F-Droid and its apps. So it’s no wonder you can’t transfer your iOS apps (which might not even have Android versions). But it is true that auto-transfers of Play Store apps between different Android spins is seamless.
Secondly, whether and how easily you can modify or replace your Android is dependent on the phone’s manufacturer. A Pixel is a very different beast from an Xperia in that regard. Still, Google do provide AOSP and are very mod-friendly on their own devices. Apple very much aren’t.
Android already does that, no AI required. Some fairly simple math is enough.
The device first charges to 80% and holds there. It also calculates how long it will need to charge from there to full and when it will need to resume charging so that it will hit 100% just before the next alarm goes off. Then it does that.