im totally new to this thing, so sorry in advance if my idea was already mentioned here.
Many people charge their phone during night which cause overcharging and shorten battery life. And that was my case. I bought Galaxy S7 year ago, charging it every night and ended up with damaged battery. My idea is about making todays smartphone chargers smart. I was thinking of using Sonoff smart wi-fi switch + MQTT. For example: in the evening you connect charger to your smartphone and let it charge your phone up to 90%. Then Sonoff powers off the charger to prevent it from overcharging. Early in the morning (lets say at the specific time or maybe an hour before preset alarm) charger comes on to fully charge the battery.
Hope you get that idea.

My question is, if it is possible to do that using Sonoff+Domoticz+smartphone.
Sorry if I placed it into wrong thread and thanks for your replies.