Root to set a battery limit and unroot again?
Setting a charging limit is not persistent. Therefore the call has to be made (with root permissions) at least once after every reboot. 

Rooting/unrooting requires at least a reboot. Therefore you can't "temporarily root" your device and set a charging limit.

If your device does not provide something like an intelligent battery charging optimization the only alternative is to use a battery charging notification app. 

There are a lot if battery charging notification apps on Play Store. Even if it is a bit old I still use Battery Full Notification  which can be configured to notify at a specific charging level.