Mexico has transformed into an industrial powerhouse over the last two decades, attracting a torrent of investment from some of the world’s largest companies.