I used to do exactly this many years ago for our kitchen tablet. I wrote a simple web endpoint smartapp that would turn a switch on and off, and used Tasker to invoke the web endpoint when the charge reached the low and high limits. It worked fine, but I eventually ditched it for a simple motion sensor to turn on the tablet when we're in the kitchen. This, along with a Google DayDream photo screen saver works for our application. When the motion sensor turns on the plug, I have the tablet configured to turn on and it immediately switches to the photo frame app.