Let us borrow the "broken windows theory" from criminology to create a theory on "broken people" and consider how to design societal policies around it. When we think of "broken people", we might be thinking about something we see in our everyday lives: the deranged homeless person shouting crazily in public, the person who breaks down and sobs inconsolably on public transit, or the person who flies into a rage in a restaurant. Or we might think about the degenerate case of mentally ill people who are locked in asylums for life. Then, we might think of a friend on antidepressants, and feel a bit foolish. Some of us might think of terrorists, and a few of us would invoke the imagery of a perpetually-angry, narcissistic, murderous, and wealthy political figure.
Milder forms of brokenness manifest in everyone — an extreme form of egomania is terrorism, of inattention is ADHD, of self-abasement is clinical depression, and of delusion is manic disorder. Excluding degenerate cases, where genetics play an outsize role, the root cause of mental illnesses is the same as the cause of lesser forms of brokenness, and can be distilled into a form of abuse, whose passive form is neglect — the victim develops a deep-seated resentment of the class of perpetrators or themselves, leading to a mental illness in the extreme case. When the perpetrator is a large share of human society, the victims turn into terrorists in the worst case.
Our brokenness defines our most pronounced personality traits. Just as our fundamental personality traits are set in stone, none of us can "fix" our brokenness as history cannot be rewritten — we can manage it and cope with it.
It follows from the discussion that demonizing a segment of the population, at a societal level, has catastrophic consequences — islamophobia is a self-fulfilling prophecy. It also follows that retributive action against bad actors is illogical — capital punishment is a fundamental error in understanding how society works. At an individual level, it is illogical to hurt other people — we do it anyway, because we're broken ourselves, due to the actions of another perpetrator. It is hence fruitless to think about the problem at an individual level, and the best we can do is some kind of societal "adiabatic annealing".
This would lead us to question — if nobody is making a choice to be a bad actor because nobody is making a choice to be broken, is anyone making a choice in being the perpetrator in the first place? Why would anyone make such a choice? Indeed, there is a fundamental flaw in our reasoning: choice or agency is nothing more than an illusion arising from consciousness. Perhaps it's disconcerting to think of us as nothing more than objects that interact with cause-and-effect; on the contrary, it is very freeing to accept it, and nothing is lost, as the illusion of agency is still preserved. We already design societal policies around the lack of too much agency, but we'd be much better off if we were able to accept it as an illusion, and suspend it entirely in our policy-making.