Is it possible to tell if an iPhone had ever been jailbroken?
This depends if a backup created when a device was jailbroken was restored on to the device.


If a device has been jailbroken, then was subsequently restored and no backup was restored, then there is no way to tell.
If a device has been jailbroken, then was subsequently restored along with a backup created prior to jailbreaking the device, then there is no way to tell.
If a device has been jailbroken, then was subsequently restored along with a backup created after the device was jailbroken, then it is possible to tell, but the device would need to be jailbroken again so that the relevant files can be found on the filesystem.