It's known that Lithium Ion batteries are damaged by overcharging or deep discharging. While I've seen an Xposed module which prevents the phone from charging the battery above 90%, I'm wondering if it helps at all, since if the battery circuitry takes care of it itself (meaning, showing 100% when really it's charged to 90%), then there's no point in charging to 80% of the real capacity. But obviously, if the battery isn't that smart, then it's worth it to prevent the phone from overcharging.
It's just not the battery but battery and the processing logic that takes care of extremities in charging
Higher side : This is well explained here XDA thread
Lower side: This is an built in Android feature from Lollipop onwards (Izzy referred to this in comments) . This is to prevent the battery getting into Sleep mode
The reason for recommendations despite these protection features is the theory that a) higher voltages at high battery levels are damaging and b) increase longevity of battery life by charging well before it reaches critical low levels. For more details, see this Ideal charging / discharging percentage for maximum battery life?
This theory has it's opposition but AFAIK jury is still out
Related, for other methods of limiting charging How to limit charging to 60%