Tesla's cars have a charge limit you can set, after which the car simply stops. I believe they come by default at 90%. You're supposed to override it if you want to go on a long road trip.
Would be cool if there was a similar feature available on phones. Maybe you could rig up something with Tasker or the like on an Android.