I think to get to that point, you'd have to have a Mexican government that was stable from the beginning... different people in charge, none of the rebellious provinces that plagued them in OTL, etc...
A major issue is that New Mexico itself was one of said rebellious provinces. Those people did
not like the central government in Mexico City. That's definitely not a good thing when the place was one of the key centers of the north of Mexico (well, as in the territories that eventually went to the US).
I think the issue is timing. It was until 1845 when the potato famine hit and the failed 1848 revolutions that really spurred mass immigration to the New World, specifically the United States. Of course the Mexican-American War starts in 1846. The only real mass migration before then was the whites fleeing Haiti in the 1790's-1800's but since Spain was supporting the slave armies they probably would not be super interested in settling in Mexico.
I really wonder if the Irish would stay loyal to Mexico. Of course, the US didn't like them much either, so I think if Mexico gets a wave of Irish immigrants, and said immigrants settle in the north/far north, the most likely result is that New Mexico and/or Alta California secedes and makes their own state that may or may not at some point join the US. But they'd need to take advantage of the chaos in Mexico that wouldn't exist to get such a wave of immigrants, and then of course there's no one to protect them from the Comanche, Navajo, and Apache besides themselves (not that the Mexican government did a particularly good job at that, though). And said American Indian raids were a
huge problem all throughout the Mexican north in the 1840s--why would you want to settle in what amounts to an active warzone?