You too? It drives me crazy every time someone spews out the "infallible truth" that Mexico should either be destroyed or swallowed by their "benevolent" northern neighbor.
I have never freaking understood why people think this. I am also quite tired of this cliché. The US swallowing Mexico cannot be a good scenario for either country.
To answer the OP, there are a few ways to give Mexico a break...and then some. There's the possibility of making Mexico fight for it's independence earlier on. You can exploit the 1799 Conspiracy of the Machetes or if you want something closer to home the Events of 1808. In both you have one of the underlying currents of Mexican independence, privaledge for the small upper class of
Peninsulares (Spaniards born and raised in Spain) against the
Criollos (Mexican-born Europeans), who were prevented from getting the best positions in government by virtue of their place of birth (notwithstanding the fates of the lower castes). In the former you had an attempt by Criollos to overthrow the Peninsular's controlling New Spain and the hope of setting up a new government, inspired by the nascent United States, but the Conspiracy was found out and the Conspirators executed. That one might be a bit difficult, but not ASB.
In the latter you have Mexican Criollos, with the support of Viceroy Iturrigaray, a peninsular, attemtping to set up an independent congress in reaction to Napoleon's invasion of Spain. The peninsulares revolted against Iturrigaray and quickly got rid of him, propping up a new Viceroy more in line with peninsular though and stamped out criollos from the leadership positions granted to them by the previous Viceroy. In OTL discontent continued to brew until 1810, but it's not outside the realm of possibility to have the peninsular takeover in 1808 go off in a manner which may force confrontations earlier on.
After the Grito de Dolores there are some nice POD's to work with. In my TL (linked below) I have Ignacio Allende take command of the Insurgent army instead of Hidalgo, and the Insurgents proceed to attack Mexico City. The Spanish retake the city, but the chain of events I have set up prevents nearly all of the Insurgent leaders from being killed like they were in OTL, resulting in a more powerful Insurgent Army that beats the Spanish earlier than OTL, leaving Mexico with a strong and popular leadership post independence. After 1815 (the death of Morelos) I think it truly becomes difficult to have Mexico get the absolute best deal it can get, but even then there are various POD's that allow Mexico a better deal than it got OTL (I highly reccomend Desmond Hume's TL
Under the Eagle Flag, and jycee's TL
A Mexican "Victory").
Iturrigaray is a great figure. Once tried handling outlining a TL where he brings Novohispanic independence. But ended up being too much. Post 1821 another POD could be Vicente Guerrero admitting his defeat against Antonio Bustamante and not causing Mexico's first coup. Or the cannonball that hit Santa Anna in the leg during the Pasty War being aimed a few inches higher so it hits him in the chest. Probably chaining the Mex-American war for good (that was going to be the POD for my TL originally but I decided to keep him longer).
Lose the Mexican-American War, but avoid the French Intervention, allowing Juárez and the liberals to win Reform War. Skip ahead a generation or two and Mexico is a stable, vibrant, federal republic and a growing power in its own right.
Technically this happened even with the French intervention. Juarez did win, and that turned out alright for a while. The Juarez, Tejada Diaz and Gonzales presidencies were all good from Mexico. The fault was keeping Diaz two months too long.
A simple best-case scenario in the more distant past is for Mexico to win the Mexican-American War. Mexican armies had superior numbers and the advantage of the defender. If they defeat either Taylor or especially Scott the resulting disaster for US arms sinks the Democratic Party while also tabling the US Civil War for a generation in the best case for the USA.
Not that easy. Almost impossible. But you can give Mexico a better deal. As I did in my TL (see link bellow). Mexico had better numbers but through the two years of the war it changed administrations five times. By this point Mexico is a failed state. But at the same time OTL proves that even at its worst Mexico managed to keep quite a bit of territory and that anymore is almost ASB. (I can see Sonora and Baja also being annexed by the US in a worst case scenario but nothing more).
Another possible scenario for a stabler Mexico would be for Diaz to go out the front door with romp and pomp as Mexico greets democracy under Francisco Madero. Rather than imprisoning Madero, and later going out the back door when Madero still won.
Fun fact: the Mexican revolution was not launched against Diaz but against Madero. In his campaign Madero made many promises he could not keep, and many allies (Zapata, Carranza amongst them) that he should not have. When it turned out that Madero did not seek economic reform but simply a political reform, these guys revolted against him. By this time Diaz was already enjoying his retirement in Paris.
Had Diaz accepted defeat, and kept to his promise that Mexico was ready for Democracy, Madero would have not found the need to ally with populist leaders like Zapata, Carraza, Villa and all those dudes. Madero would have been elected in 1810 and Mexico would have celebrated its centennial under a new young vigorous leader. Economic reform would have come in due time. And Mexico would have kept the simpler 1857 constitution, rather than the mess of volumes we have now with the 1917 one.
You could end up with a Mexico of today's borders and population. But with an even steady growth from 1910 till today. Rather than than the constant ups and downs.
IMO a Mexico that got a good deal (regardless of POD) non-wank by 2010 would have:
OTL's territory (plus a bit more in the North).
Todays Mexican population (add the Mexican-American population of respective territory added). This ranges between 110-130 depending on size. However this population is more diverse (due to a steady flow of immigration) and more spread out. With 4 or 5 cities that have 5 million + population: Mex City, Monterrey Guadalajara, Puebla, Veracruz, Puerto Vallarta. Take your pick. San Diego, Los Angeles, Laredo could also be candidates if Mexico keeps more territory in the North.
A Mexico City with no more than 16 million to avoid the gross centralization of OTL.
A nominal GDP somewhere between Canada's and Itlay's GDP of OTL. Making Mexico #8 or 9 in the respective TL. (Mexico is #14 in OTL, nominal GDP speaking).
A GDP per capita, like that of OTL's Italy or Israel, bumping it from the low 50s on the list to the low 20s.
The highest foreign tourism world wide. (How we have the beaches, ruins, cuisine, culture, etc that we have. The richest country as our northern neighbor and still not manage to make this so perplexes me).
And a cultural maturity, free of the identity crisis that plagues Mexico today. By this I mean that when a British TV show makes fun of Mexico, Mexico will laugh with the joke rather than make a huge fuss about it. That when Yanni wants to hold a concert in Teotihuacan he should be allowed to do so, to promote tourism to the area. And that if someone wants to hold an F1 Gran Prix to a Mexican city, we allow them to instead knowing it will bring cash flow to it rather than dismissing it as a sport of the rich.
Honestly all of the above does not seem that hard for Mexico to achieve without the need of being annexed by the US.