In the US there’s a strong inverse correlation between a state’s homicide rate and its proximity to Canada.
I’d like to note that Brazil no more “colonial” than Canada is.
In “American Homicide” Randall Roth argued based on from his wide ranging assessment of murder rates in the US and previous colonies over several 100 years that the main driver of murder rates is the strength and perceived fairness of public institutions and the reflecting that, degree of confidence in the public in those institutions and the social hierarchy.
Where those conditions were met to high degree, US/colonial murder rates were often lower than those in Europe in the pre-CW period. In cases where there almost was no law, they were sky high. It wasn’t a myth that ‘Wild West’ murder rates were extremely high, they just were not that significant in absolute numbers. They were more significant numbers in California in 19th century in a larger population where legal institutions were weak and biased (against Latinos, Asians, natives, often in cross-racial murders by whites). The murder rate in Appalachia pre Civil War was low; it’s never fully gone back down from the knock on effect of social divisiveness there which started with the war. Etc.
It carries over to today in that view, which I find convincing. Murder rates aren’t high among African Americans mainly because guns are available. Mainly, people often within a subculture of crime (a lot of murders in the drug business, whose participants can’t use the legal system to settle disputes) within a larger subculture of historical distrust of legal institutions (with a historical reason), do what they have to do to get guns. Poverty could similarly be viewed as mainly the result of alienation from society’s institutions, which were (or are, you can debate what combination) biased and exclusionary, rather than an independent cause of violence.
The US murder rate isn’t low by developed world standards even only considering whites*. But the level of trust in institutions and sense of social cohesiveness among American whites isn’t high by rich country standards either.
*see CDC graph, US white non-hispanic murder rate was 2.7 per 100k recently, most rich countries have rates between ~.5 and ~2.
That’s not to say gun laws can never play a role in lowering the murder rate. But I believe perceived need for guns for self defense is mainly caused by the circumstances leading to a high murder rate than causing those circumstances.