How to limit charging to a user defined limit?
There now is a hardware+app solution for that, it's called Chargie. https://chargie.org

Basically, Chargie is a Bluetooth switch that is linked to an app on your phone. You set the desired level of charging, the app runs in the background and stops the charge at the percentage you set. 

*disclosure: I am the CEO of Lighty Electronics, we have developed this solution and this isn't meant to be a spammy post with a link, but rather a very relevant solution to this issue. As far as I know, there are no other manufacturers of such devices.