There may be ways to avoid the "gunk". Some people suggest sterilizing the medium (tedious and smelly) or using various biocides or varying ventilation, humidity, watering schedules, etc. I find it doesn't happen all that often. When it does happen, it seems easier to just deal with it than prevent. My "method" is to keep my grow areas reasonably clean and organized allowing a certain degree of ventilation according to the plants involved. You will find that certain species are happiest with certain ranges of environmental variables which will vary according to your local conditions. Eventually the gunk and similar problems will become less of a problem.