Does the average cellphone battery protect against overcharging or deep discharging?
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%