Enhanced electrocaloric efficiency via energy recovery