The Snowden leaks are now pretty dated. It's possible infiltration tactics have changed or were never that pervasive. Generally though, what I see in all of this is the malignant narcissist at the top setting this all up. He knew he was in real danger of losing the election so he started months ago in sowing doubt of the legitimacy of the vote. All prepped to believe that the only way Trump could lose the election is if it were stolen, these folks actually thought they were preventing the coup, not participating in it. Obviously they should be charged, but something deeper has to change if we're going to prevent more of the same. We must return to valuing critical thinking skills over rote facts in schools. We need to figure out how to incorporate the massive power of social media into society without having it be a hotbed of radicalization.
I believe that Trump wanted the riot to happen so that he could revel in the knowledge that these people love him so much they'll overthrow their own democracy for him. In that light, he purposely encouraged lax security. Just contrast photos from January 6 with those from the BLM protests. You can see the vast difference in numbers and attitudes of the deployed police/national guard.