It might be a mistake to keep thinking of Mexico as a unitary entity. There are parts of it that Mexico City has no control over
Well,there are two possibilities here.
1. The national government could assert control, but chooses not to do so. That makes anything done by so-called 'rogue elements' and 'third parties' actions taken by defacto agents of the national government. So treat those actions as actions of the national government, and hold it accountable.
2. The national government can not assert control. It is no longer sovreign over that territory. Recognize the territorial holdings of those third parties, and declare war on them. Depending on how much help the former sovreign holds, consider giving them the territory after hostilities have concluded.
More broadly - Mexico's problems are more due to Mexico than magic lizard people from Langley.
80+ years of uninterrupted left wing uniparty control will do that to a nation.
Mexico has suffered every bit of corruption, assninity, and irrationality that the former USSR did. It is the constant trade with the US that has kept Mexico afloat for the past century or so, and it is the ability to offload their most ambitious and restless up north that has allowed the Mexican ruling class to vent the pressures that would otherwise force them to change their ways.
The US needs to cut off mass immigration from Mexico, not so much for our benefit (Dem dreams of using replacement theory to turn Republican states blue are crashing and burning hard as the Dems turn away from their Labor-ethnic roots and assume their final-form as apologists for elitist debauchery and status), but for theirs. Mexico is never going to get the quality of leadership and freedom that Mexicans deserve as long as the US border servers as a release valve for the existing agglomerations of corruption masquerading as local and national governments that the Mexicans have suffered under for well over a century.
How, as with many things, the issue is not the supply, the issue is demand.
1. Cut off all welfare benefits for illegal aliens. Criminals should not qualify for government assistance while they are still actively committing crimes.
2. Arrest and jail those who hire illegal immigrants, prosecute them under the laws against slave-trading.
3. End asylum applications in the US. If they want asylum, they need to apply at home. If they try to apply in the US, fly them to Guantanamo, and they can wait their until their cases are resolved.
4. Immediately deport illegal aliens found in the US across the closest international border. They don't have a passport? Not our problem. Mexico and Canada don't want them? Fine, give them a life raft and drop them 100 miles from land off the nearest coast. Publicize this policy. Soak up the bad press when the first few die at sea.
5. Treat the US border as something that actually matters - set military bases along it, treat trespass on those bases as attempts to trespass on any restricted US military facility, and shoot on sight. Publicize this policy and the inevitable resultant deaths as well.
You'll probably see a few dozen deaths, but the flow will turn to a trickle rather quickly.
As for the cartels, the US could cut them off at the knees overnight by legalizing most intoxicants, and regulating those the way we do alcohol. There are only two or three corporations who ultimately own about 80% of the alcohol sold in the US, but we're not worried about them taking over towns and breaking the rule of law. The only people who want to keep current US drug laws in place are:
1. the deluded idiots who think, somehow, magically, Prohibition 2.0 will start working if we shoot more people. These are the sort of people who think they can create cold fusion with a light-stick and seltzer water.
2. the virtue signalling moralists who don't care that it never has nor will work, but want to go on record as being against "bad things". Why anyone listens to this type, about anything, escapes me.
3. the current judicial/correctional/legal industry participants, who need the revenue stream. Both from the budgets to do their jobs, and the bribes not to do so.
4. the alphabet agencies, who like to have something to fall back on as a convenient justification for their budgets, status, and power, for when this whole terrorism thing finally burns out.
5. the cartels themselves, who know damn well that the only real impact of US drug laws is to inflate their profit margins and minimize competition.
Are drugs bad? Yes. Do they screw up peoples lives? Yes.
You know what? So do gambling, drinking, smoking, sex, and the internet. People will find ways to screw up their lives, no matter how hard you try to mommy them. Maybe try treating American adults as actual adults, and let them own the consequences, for good or ill, of their choices.