I choose diets based on what certain cockroaches in their habitat can eat. To do this, I simply take a specific species and one of the geographic locations in which this species lives. Then I study the composition of the flora of this place and seasonality. As a result, I get a list of the main plant species with their vegetative and generative mass. To this we add cannibalism and carrion. In practice, for example, for "Madagascar cockroaches" of all kinds, I get the following diet: wheat bran, grass meal, meat and bone meal 2:2:1; in addition, once a week cockroaches receive fresh carrots in a single dosage, but this is not necessary at all, this is because I kind of feel sorry for cockroaches and I do it purely from "human" motives.
As for mosquitoes and other unnecessary living creatures, I completely exclude any substrate and moisture, since the "Madagascar cockroaches" (tribus Gromphadorhini) need very low humidity - they actually live in the desert.
With "wet" cockroaches, everything is more complicated. You can not feed the same food, because everything will be covered with mold. I just put leaf litter and half-dead crickets on the substrate. Leaf litter is eaten gradually, and crickets rather quickly. So, for example, I keep Polyphaga species that live in damp, warm burrows in the deserts of the Old World, emerging at night to feed on green and dry plant parts, mammalian excrement, and carrion. They have practically no mosquitoes, because they rummage in the substrate and if they meet some kind of not very mobile and soft living creatures, then they immediately eat it with appetite.