While it’s not the best run place, it is perfectly capable of large scale infra projects and state capacity and capability is pretty well developed.
Of course, on average Mexico is poorer, has a lower GDP per capita, and so on. But the level of ignorance among Americans is astonishing sometimes.
As someone who has actually done that, and speaks Spanish, and has spent considerable time in over a dozen Latin American countries my impression of Mexico is that it’s one of the wealthier and more advanced countries in the hemisphere and often feels like a borderline first world country on par with Southern European countries like say Greece.