There are plenty of toxic communities. Belonging to them may salve loneliness without being healthy. If for example the community is built around resentment, revenge, purity, a charismatic leader, etc., fellowship may still provide a strong attraction ... that is best fulfilled elsewhere.
Cults specifically look for people who aren't already tied in to healthier communities when they're recruiting. They want people who feel alienated and disconnected, because those feelings make them easy marks for what the cult is selling. With participation in healthier communities of all kinds slowly atrophying since the early '90s, the pool of people vulnerable to the appeal of toxic communities has grown.
The way to drive toxic communities back to the fringes of society is to build and support healthy ones.
Toxic is contextual to an individual. Some products don't affect all life forms the same way, or at the same dose. Same for communities: you know if you are in a toxic one if you can objectively observe it brings unacceptable suffering to you when you are in it.
It's not precise science, it's subjective, and sometimes hard to identify.
There are plenty of toxic communities. Belonging to them may salve loneliness without being healthy. If for example the community is built around resentment, revenge, purity, a charismatic leader, etc., fellowship may still provide a strong attraction ... that is best fulfilled elsewhere.
If nothing else, better to get a dog than a cult.