It depends on the species. There are several monogamous species (all lysiosquillids - striped spearers) that live for years as mated pairs. Other stomatopods will form mated pairs at the time of breeding and a male and female may cohabit for a few days.
In the field, you will often find two or three animals living in the same piece of rubble, often only a few cm apart. However, they have cavities that they can defend (a big animal can't get into a smaller animal's cavity) and if things turn nasty, on animal call always flee. This can't happen as easily in a tank.
If there are lots of cavities in your tank and you have a few small gonodactylid smashers, they probably will coexist. Competition for cavities is the key. Eliminate competition by providing enough places to live and everyone will be happy - although stomatopods will occasionally kill and eat another stomatopod when it molts. The more places to hide, the smaller the risk that this will happen.
If you are asking about large smashing species such as Odontodactylus scyllarus or Gonodactylus chiragra, the answer is probably no. They may coexist for a while, but sooner or later one will probably kill the other. They are very territorial and most tanks just are not large enough to allow them to live together.