Have you played with the capture target? i.e.:
gphoto2 --set-config capturetarget=0
will only keep the photos in the camera's ram, instead of writing to the card.

Then query and download the images from the ram?

I don't know if it possible though.