You can reduce this risk with a Magisk module known as the "Advanced Charging Controller."
This tool will allow a limit to be placed on the charging percentage; I have my phone set at 80%, so the battery never spends time at 100% charge which is the most damaging.
ACC is simply a must-have for me right now. Battery degradation is massively limited if you don't charge over 80%, especially with the ridiculously unnecessary "ultra fast charging" most phones come with nowadays. And it is still plenty to last through the day.
This tool will allow a limit to be placed on the charging percentage; I have my phone set at 80%, so the battery never spends time at 100% charge which is the most damaging.
https://themagisk.com/advanced-charging-controller-acc/
https://github.com/VR-25/acc