Here's a solution... this is what they do in other countries. Brand the gangs as a Vicious Lawless Association and then hold the gang leaders accountable for anything their members do by having them serve time for the accumulated offenses, and you will see the violence drop.
Here's how its done in Australia: The Act declares a person to be a "vicious lawless associate" if they commit a serious offence "for the purposes of, or in the course of participating in the affairs of, the relevant association". It is incumbent on the defendant to prove that the association is "an association whose members do not have as their purpose" the serious offences listed in the Act.
If a person is declared to be a "vicious lawless associate", this Act mandates a further 15 years imprisonment on top of the sentence for the crime for members of the organisation, and 25 years imprisonment for office bearers of the organisation.
More information about formatting options