System optimization of a heat-switch-based electrocaloric heat pump