The goal is to eliminate both charging anxiety and environmental concerns. Now researchers have created the “recipe” to do it.