Not the solution you're asking for but I've used the ACC magisk module to do this on devices for years. If you're willing to install magisk and then ignore it this is a very mature solution.
Otherwise, like others have said, run home assistant on your network somewhere and have tasker call to HA to switch the charger plug off when you hit your target charge level. That should be pretty straightforward.
So don't buy one? You don't need a new phone every 1-2y unless you're a spectacularly well trained consumer.
I usually replace my phone every 3-4y when power efficiency and performance have significantly improved, or there's a new radio standard that I need (5G, AX WiFi) or the camera makes me want an upgrade. If none of those things are true then use your phone until it dies 🤷♂️
An E keyed socket should provide everything an A+E card needs to function. Plug it in and test it out. Generally with m.2 if the card fits the socket you're good to go (just don't expect a CNVi card to work on a non CNVi platform.)
Read the fine print too, a lot of these "mental health counseling services" have carve outs that stipulate that they can pass along data about your sessions to third parties (like your employer.) Most of them aren't health care professionals so health care law doesn't apply.
I wrote snapshot hooks for Arch that fire before installing or upgrading packages and I have a simple shell alias that I can use to fire off a manual snapshot any time I need one. If a package breaks in an inconvenient way and can't just be dowgraded back to function or I have some other time pressure I can just point my root partition at a clone of my most recent snapshot and reboot to roll back. I don't usually bother rebooting into a cloned snapshot to test changes as I can just perform the same steps to roll back and the automated rolling snapshots mean I don't need to baby anything to have the same protection.
Yeah, shizuku could work I'm just not aware of any shizuku enabled charge control software