There were guys on Shark Tank with this idea for crickets. They had it all figured out. I can't find the exact episode on YouTube now, but here's the story:
http://sharktanksuccess.blogspot.com/2014/03/cricket-energy-...
The full episode is on ABC's site, probably up for another week or two.
http://abc.go.com/shows/shark-tank/episode-guide/season-05/5...
They said: "when they're culled we lower the temperature so that there's no violent death or change in state (because insects are exothermic their metabolism slows until they go into a coma-like sleep without any pain)."
Not sure how they determine the pain thing, but that's apparently how it works.
I imagine there will eventually be a market for units that click together to create insect farms. Heating, lighting, food and water, with different shelves for different bugs.
I haven't seen anyone talking about the killing process. Do you just throw them into a deep fryer and hope for the best? Gas them?
I have a strong aversion to the idea of eating insects. I don't know how serious my hunger would have to be to overcome this. And that's for already dead and cooked insects. Give me a cage of wriggling moving bugs and I would have a really hard time killing cooking and eating them.
(I don't eat shrimps or prawns or lobster or similar for this same reason).