Would turning an iPhone off when charging from an untrusted charger make it safe from juice jacking?
Not really — depending on your phone
"Juice Jacking" works by offering a malicious user an approach vector to gain access to your phone during the charging process by leveraging the USB data/power cable to illegitimately access the phone’s data and/or inject malicious code onto the device.
Only a few devices don’t expose the data if you power them off completely. Some phones will, despite being powered down, still power on the entire USB circuit and allow access to the flash storage in the device.
The problem is that most smartphones are configured to just connect and dump off data, so anyone who has malicious intends could put a system inside of one of these kiosks that when someone connects their phone can suck down all of the photos and data, or write malware to the device. Some phones are even accessible even though you configure the USB transfer to be "off". As soon as you plug them in, they might instantly switch into USB transfer mode.
The safest route for charging your device is to use the supplied power cord that plugs into a regular electrical outlet. If you must use a random charging kiosk, the safest option may be to completely power off the device before plugging it in. Yet, depending on your phone, that's no guarantee that you won't be leaking data.
To add security, you should lock your phone. When your phone is locked (truly locked, meaning "inaccessible without the input of a PIN or equivalent passcode") your phone should not pair with the device it is connected to. iOS devices will only pair when unlocked.
Another option would be to jailbreak your iOS device to lock and unlock the device’s pairing capabilities with tools like "pairlock" (http://www.zdziarski.com/blog/?p=2307).