History-dependent erosion mechanics and reverse-shear instability in alternating flows | Synapse