Welcome to the RTA Forum!
Let me first start by clearing up some things you posted that aren't quite right about I-10 and I-8.
Neither Interstate goes into Mexico.
I-10 stays north of Juarez. While Juarez reputation as a dangerous city is well earned, the violence has really not spilled across the border. In fact, its Texas neighbor El Paso, which I-10 goes through, is actually ranked as one of the safest cities in the US.
I-8 does run very close to the border, but it also never crosses into Mexico, nor the Mexican city of Mexicali.
You may run into some border patrol checkpoints along either route, but there really is no need to have any extra worry about taking either route.
Now as far as Phoenix goes, there is a loop around the city - AZ-101. However, it goes into the far north suburbs and would really make no sense at all for you to use that as a way to avoid the city. If you want to bypass Phoenix, the route to take is I-8 to Gila Bend, and then go north on AZ-85 and rejoin I-10 at Buckeye.