Is it possible a process should run in the background of Android OS,
and the only task of that process is to stop the power intake to the device when the battery is completely charged?
Have you tried Battery Charge Limit 0.1? I haven't really tried it myself due to incompatibility with my android version.
It requires root and android versions 4.4+
you can find it here: Battery Charge Limit 0.1 4.4+
I am not suggesting you to install such an app.
Because almost all phones have the feature by default.
You can see it by connecting to a power bank.
Charge your phone by connecting it to a power bank and after getting completely charged, let it be there without disconnecting. After some time, if the power bank stop producing current(turned off), it means Your phone has the feature of automatically disabling power intake.