I have not tested this on a Raspberry Pi yet, but it seems you can disable automount within /home/pi/.config/pcmanfm/LXDE-pi/pcmanfm.conf
https://forums.raspberrypi.com/viewtopic.php?t=91677
Here’s another example:
There are some examples of using gphoto2 here
THETA X Firmware 2.50.2 Improves USB API in Unofficial Community Tests