Minimizing irreversible losses in quantum systems by local counterdiabatic driving | Synapse