charging when docking

Is it possible to install an application that let you avoid to charge the iphone when docked?
I would doubt it. There's no way your iPhone could tell the difference between whether it's being docked and just plugged in. Why would you not want to charge it?
Because I don't want to damage the battery plugin it all the time to sync my files

Original thread: https://forums.imore.com/threads/charging-when-docking.184902/