The smaller the group, the less hierarchy you need. I think that Switzerland is at the size limit of what direct democracy can support. In fact, it is not fully direct.
Wealth also helps. The richer you are, the more you can focus on your role in running the county and make informed decisions. That's because you have all your basic needs covered and don't really need to think about about your survival, leaving you open to higher level activities.
The classical example is Athenian democracy (the original). It worked because it involved only about 30000 people of the highest social class. Women and slaves didn't count.