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.
All other things aside, which Logitech mouse are you talking about? Both my G Pro and my G 305 work out of the box. Logitech also advertises them as ChromeOS compatible and AFAIK the Logitech wireless dongles are USB HID compliant so seeing a Linux straight up refuse to interact with them sounds very weird.