Would we even need a wall if US companies set up shop in Mexico instead of China?

Like Ford and other companies have?
Why doesn't apple make phones in Mexico?

Cheaper labor in China. Better profit. More money!

Apple and Ford need high IQ Asian labor. They do outsource jobs to Mexico if they can be managed by low skill workers but that is simply not the case with Apple or Ford. They need high IQ laborers.

Move to Mexico and find out!

Mexico is more expensive and the labor quantity and quality is poorer.

We need some way to establish and defend our southern border. People from Central America would not care that Mexico had U S companies. {Nor would some Mexicans that illegally cross the border to get the good life in America.

NAFTA includes environmental restrictions that Apple doesn't like to deal with.