Sure it does: it's called Indonesia, it has twice the population of Mexico and half the GDP (I know, I was surprised too!). What it doesn't have is a porous border between the two; of course the fact that it's a sea barrier (only ~50 miles though) instead of a land border makes it much easier to close, but if the US had the political will it could make the US/Mexico border a hundred times less porous than it currently is.