The process itself is non-toxic, but bacteria and whatnot will soon grow wildly on the partially decomposed proteins, and that's when it gets toxic.
Another small problem is that the midgut gland is relatively prone to heavy metal enrichment, and when it rots the heavy metals come out and create contamination.
But these are essentially the same as other fresh meats that can't be eaten after sitting out too long. It's just that small crustaceans like crabs rot a little faster. It's not that the crabs have to come off the pot alive.
Experienced advice from some seafood lovers abroad is that, to be on the safe side, it's best not to leave dead crabs at room temperature for more than a few hours. Dead crabs are fine if they are frozen as soon as possible.