> Brazil, Chile, Peru, etc. aren't nearly as bad
Brazil is just as bad.
Drug gangs essentially own their territory. Brazilian state is legitimized by the police's monopoly on force. Gangs don't allow police in their territories which implies the laws of Brazil don't apply there. They have seceded from brazilian territory and established their own parallel government without anyone noticing.
It's common knowledge that local businesses operating in those places are doing so with the blessing of these drug lords. They even took on the role of police by punishing small time criminals who interfere with with their drug dealing operations by scaring away customers. They implement barbaric punishments like cutting off the fingers of thieves or shooting their hands. People living in those places may not even get mail because it's too risky to send mailmen in there, I've seen people who had to go to some remote post office to pick up correspondence.
It's actually kind of impressive. Shows what a people can do when it has the balls to organize and most importantly to arm itself.
Extreme corruption, lack of rule of law, extreme violence to name a few. Mexico is basically a failed state: the government doesn't even control large parts of the territory it claims, ultra-violent drug cartels do. How is that a good place to build factories?
Other central American counties are at least as bad. El Salvador has a higher death rate from violence than war-torn Syria during the height of its civil war.
Countries farther south would be much better bets, but they still have huge problems with corruption. Brazil, Chile, Peru, etc. aren't nearly as bad, and do have their own manufacturing industries (Brazil is home to Embraer, for instance).