It has been available in some form since Android 11. It’s no longer limited to Pixels - my Motorola has a similar feature caller optimised charging, which doesn’t even require alarms. LineageOS also has like 3 different ways to limit charging. In short, you definitely do not need root.