The extremal index of a higher-order stationary Markov chain