Cockroaches aren't poisonous: you could perfectly easily eat them. It's just the places they inhabit are pretty filthy. If you fed them a hygienic diet, they would probably be a good source of nutrition.

The same is true of snails. If you pick up a garden snail and eat it, you'll probably get sick, but if you trap it in a birdcage and feed it on oatmeal for a week, its gut is purged of the nasty stuff it's been eating.