I don't know what they use at industrial scale, but you can already do this at home scale.
Soldier fly larva will happily crunch away all the moldy or rotting household food waste you throw into a cold compost, but good luck getting a chicken to voluntarily eat much of it (and they'd probably get sick pretty often if they tried).
I assume industrial operations work essentially the same way, making use of the countless waste streams that livestock either won't consume or can't safely consume.
The bigger question for me is how they harvest at that scale. The hearsay I carry around in my head is that they just drown insect crops in chemical pesticide to harvest them, which I'm hoping is not the norm.
> good luck getting a chicken to voluntarily eat much of it (and they'd probably get sick pretty often if they tried)
I've had a cold compost as a part of my backyard chicken coop for many years. All kitchen scraps, as well as all yard waste, ends up there. Moldy fruit, veggies, breads, literally everything including things like turkey carcass after Thanksgiving. I've never had a chicken get sick off it and the food scraps are quickly either consumed or dug into the pile, no rotting mess. Every spring I dig it all out for the garden. It works out great.
I would imagine that opportunistic, omnivorous eaters have a higher likelihood of passing a parasite over some insect that only feeds on live/fresh plant materials.