Ghosts are fine either being housed separately or communally. However there are some stipulations for housing them together so that they do not become stressed and possibly eat each other....they need to be of similar size, fed well & regularly and have a large enough enclosure for all of them. Because mantises spend the vast majority of their time hanging upside down from the ceiling of their cage, increasing the amount of ceiling space is most important for a communal enclosure. I successfully kept 3 ghosts in a 12"x12"x12" cage from L4 to adult. However, when they become adults any males should be immediately separated out if you don't want babies. If you do plan to breed the males need to be removed to a separate cage after mating so the females can lay her ooths in peace and for the males' protection. Males will keep trying to mate even if a female is no longer receptive and this can become dangerous for him if she gets annoyed by his advances. She may try to eat him.
The person who said you shouldn't house them communally if you are not ok losing even one is correct. While cannibalism is quite rare with ghosts it can still happen, especially if they get stressed for whatever reason. If you are a beginner it might be better to start out with them separate until you have more experience how to care for them properly. Don't worry about them getting lonely if housed alone, they are not communal in the wild, they can just be housed that way in captivity because of the low risk of cannibalism. Ghosts are not aggressive hunters rather they are "sit and wait" predators so they don't generally chase down prey unless really hungry.
.