When is an organism captive?

Yes, I agree with @jhbratton above.

An observation with a photo of an egg found in the wild at its time and place of capture is wild. After that, if the egg has been brought into captivity/protected/supported by a human in some other way, it is no longer wild but captive.

This specific situation has been addressed in some past forum posts as well:
https://forum.inaturalist.org/t/captive-raised-caterpillar-observations/31361
https://forum.inaturalist.org/t/still-wild-or-already-captive/17340