I've been successfully composting for quite a few years and have always had a few various bugs in my compost. But this year the cockroaches are way more numerous than ever before.
As soon as I start to spray water on the pile they start scurrying in every direction.
I have mostly veggie scraps; occasionally add shredded paper; less occasionally a bag of grass clippings that I got from someone (we don't have grass in our neighborhood); once or twice a year I add horse manure. Recently I added extra grass in an effort to crank up the heat and kill them off but that didn't do anything.
I live in Mesa.
I wouldn't be thrilled about roaches in my worm bins! This website for DE states that it can kill worms though: https://www.diatomaceousearth.com/faq/pest-control/outdoor/#does-de...
I would try setting dishes of the DE in the worm bed so you can remove it after the roaches have had a chance to walk through it.
It would also kill many of the smaller critters that help decompose a compost bin, so I think it's too broad and indiscriminate at killing bugs for use in the compost pile. maybe all around the pile so that the cockroaches that run out run through it?