Reminds me of “Chargie”, a gadget that goes inline with your USB charging cable and controlled by an app on the device to limit the charge level to whatever you choose. I think it was born via kickstarter.
“The most Intelligent Battery Health Protection for Phones & Laptops”
https://chargie.org/