Koen has it running for several months. Suggest you give his code a try. He used ptpcam, not gphoto2.
Note that I believe he used an older version of Raspian, not the latest version.
During the several month period, he's had these issues:
- camera will not turn on if the power goes off. (tree branch falls on power line)
- camera battery freezes from time to time. (he has it outdoor near Harvard)
The biggest problem is that the camera can't turn on by itself if you lose power to the Raspberry Pi.
The longest I've personally tested it for is one day.
I suspect, though have not verified, that there may be compatibility issues with the ptpcam libptp on the newer versions of Raspian.