The ergodic method: plasma dynamics through a sequence of equilibrium states