To avoid detrimental overpopulation, it is generally best to keep just one species per cage.
Especially small or very fragile species should never be kept in the same cage with very large and bulgy species like e.g. Heteropteryx, Haaniella or Eurycantha. These could seriously harm and injure the more fragile insects with their spines and claws or may even nibble away their antennae and legs.
Each "walking leaf" culture (Phyllium) should be kept in a separate cage, and separate from other phasmids. Due to their almost perfect camouflage, they are easily mistaken for food plant leaves. Thus their abdomen is often mistakenly eaten by their co-inhabitants, a sort of "cannibalism".
Long-legged large species (e.g. Phobaeticus serratipes) but also smaller and more fragile species (e.g. Lopaphus or Pseudodiacantha macklottii) show a strong tendency to lose legs when too many specimens are kept together in the same cage.
Also, species like Anisomorpha or Pseudophasma, which have an often smelly and corrosive defensive spray should be kept separate from other species, as the secretion may harm other co-inhabitants.
Obviously species which originate from a humid tropical climate, can not be kept together with species from a dry habitat.