Is it possible to reduce the charging current? I'd like to reduce the charging current of my phone, because

It gets too hot
I am charging it overnight so it's more beneficial to charge it slowly.

Is it even possible from a hardware perspective to regulate the charging power (e.g. reduce it from say 2000mA to 1000mA)?
I tried to search on google but not only that I didn't find any apps that would be able to accomplish it - I didn't even find anyone discussing it anywhere.
Solved using the magisk module advanced charging controller (AAC), which let's you set the maximal current to whatever you want using the shell command aac --set --current {milliamperes}.