If you hadn't already setup Photos syncing to iCloud, that wouldn't help, but not a bad thing to look into for the future. An external drive is also a good idea in addition to a second backup type thing like Time Machine or something else.
If photos are your biggest priority, you might want to think about a photo hosting site and use that to store your pictures in a nicely accessible way beyond just a dumping ground.
Recovering files is possible if you just delete it and do nothing. A lot of recovery apps are reconstruct the data at that point. Once you erase the partition and re-create it, it gets harder. Once you do a re-install, it gets nearly impossible because you've overwritten the space that previously held pieces of you files. So, even if you manage to grab some pieces, they won't make any sense without enough of them to put something meaningful together.