In a sufficiently diverse nation, every group of people, by itself, is a minority, and therefore fears a majority trampling all over them. But this means the minorities have a shared goal that trampling should not occur, and will establish and defend institutions to prevent trampling, such as a legal framework that treats every citizen equally, or treats every (official) language equally, and so on.
As for how a nation becomes sufficiently diverse, all that is needed are different divisions for different political issues. For instance, a person may have a region of origin, a gender, a faith, a language, and so on, and vote according to whichever division applies to the matter at hand. Then, most persons will experience being in a minority every once in a while.
From the comments:
Historically, various groups looking for civil rights have often been at odds with each other, like black and female groups in the US
Of course they can be at odds which each other. But when it comes to minority protections, they have a shared interest. In a direct democracy, where individual laws are put to the vote, a law that benefits several minorities can enjoy the support of all of them, allowing an informal coalition of minorities to prevail against a single group even if that group is individually stronger than any minority.
And that's why I contend that in a direct democracy with many minorities, there is a strong incentive for the creation of institutions that protect minorities.
I realize such subject-specific informal coalitions have greater inertia in a representative democracy, in particular if that representative democracy has effectively devolved to a two party system. But in a direct democracy, where people vote on individual laws, such informal coalitions can form very easily.
What country holds together when there is no some form of majority? The rest of the minorities are always set aside
Switzerland, for instance. We have 4 different official languages, numerous cultural divisions, the strongest party has a mere 25% of the vote. And still we hold together - and have held together for centuries.
calling women a minority is wrong in every possible way,
You're assuming that women are equally franchised, which may not necessarily be the case. In many regions of the world, formal or informal mechanisms can make it harder for some groups to vote than others, so a group may be a minority (in the sense of voting power) even it its members are numerous.
Gender may also be relevant as an additional factor. For instance, mothers may have different interests than fathers, so gender can play a role in identifying minorities even if both genders are represented equally.