Actually, I think the BMW I3 already does this (although engine braking is perhaps the wrong term technically). Probably a few other EV's with heavy brake regeneration/engine braking do this as well for safety reasons. So it's not that hard to do apparently, I think it's a good idea.