Mold grows under the following conditions: Darkness + Humidity + Heat = Mold. During the warmer months, I dump out the hornworm poop. It also allows some of the Co2 build up and humidity to air out.
I never feed my chams hornworms that have mold. On a side note: Hornworm poop makes great fertilizer for your plants.