Now that requires a long answer. For now, as with most things, it’s a combination of the two.
For now, the primary issue - at least as I see it - was a serious degradation with in the Party when Xi came to power. It was a free for all (rampant corruption) and risked delegitimizing the Party. Power needed to be recentralized and that’s been an ongoing process for the past decade.
Were people caught up by being on “the wrong side”? Yes. But, again for me, that’s a second order effect.