To make this practical, you would probably have to remove the springs on the derailleur so the servos can be reasonably small and don't continuously have to hold tension (a huge drain on batteries). Also, you would want some sort of mechanical lock on the derailleur position, again so it can locked into gear between shifts without consuming batery power.
I've never used Shimano's Di2 but I've heard the battery life is extensive (good for 500+ miles) with a modestly sized battery. So, they've made it very efficient to minimize the chance that you'll be in limp mode because your shift battery ran out.