Does TRIM have my pictures in memory somehow?
Regrettably TRIM is unlikely to be relevant to recovering your lost photos.


  A trim command (known as TRIM in the ATA command set, and UNMAP in the SCSI command set) allows an operating system to inform a solid-state drive (SSD) which blocks of data are no longer considered in use and can be wiped internally.


However, a data recovery organisation may still be able to extract photos from your iPhone's storage. Much depends on if the location on the storage has been erased or if the original files are encrypted.

The technical details of how your photos could be recovered is better left unknown; it is unlikely to directly help you. Contact a couple of reputable data recovery organisations and ask them for quotes.

This is a horrible situation to be in. I hope you are able to recover the photos. Good luck!