1) Choose the people to tell the secrets to wisely. I've always been puzzled when the society that has apparently managed to keep itself secret for hundreds of years then passes the information to honest, forthright, babbling Fantasy Teenager #3,456,890. I'm even more puzzled when the character goes against all previous characterization up to that point and manages to keep that secret.
A society that is in danger of reprisal by the Powers That Be, whether they were once in power and driven away or just because the Powers That Be serve a different force, should be worried about its own safety. Telling a teenager they had just met that day and couldn't absolutely trust with secrets is another Stupid Thing Authors Justify With Destiny. The stories that work best center around teenagers raised by the secret society, who have always known that the need for deception was important, even if they didn't know what lay at the heart of deception. Someone who tells the truth all the time and couldn't even conceive of that society a day or a week or a month ago is not the best choice.
Another story I always wanted to see: A teenager like that gets told the secret, gets teased in the way that it seems fantasy teenage heroes always are, and brags about the important thing he got told. The next thing you know, blam! go the good guys, and the teenager is left alive, knowing that he was responsible for the secret order's end.
Something like that would be the only exception I'm willing to make for the next point.
2) No Last Survivors. There's a dramatic ambuscade, usually not too long after the teenager is told the secret, and lo and behold, the teenager and maybe one other person are the only ones left alive. That one other person is usually one that doesn't like the teenager, and instead of being permitted to browbeat the youngster and protect them as should naturally happen, the teenager ends up being the protector and the leader.
Why is it that, in a pair where one's a starry-eyed initiate and the other's a wise old mage, the leadership goes to the dingbat?
This is my main argument against Last Survivors; I don't think most fantasy authors handle them well. I think there are plot convenience matters too, hence why the good guys get wiped out only after telling the hero the story, but what irritates me most of all is that dingbat leadership thing. Age and experience don't seem to matter at all, even when the secret group was dedicated to the protection of the Destined Whatever and the Destined Whatever had no idea that he's supposedly the best thing since goat cheese. Why? Because the older one is just bitter, that's why! Youth and ignorance shall lead the way!
3) If you have a secret society that's the persecuted remnant of a much stronger group, do not make them Right and the other side Wrong. Somehow these older groups have managed to preserve their knowledge and history almost perfectly, without it getting lost to legend-making. If they can hand spells and names of herbs down from generation to generation, they ought to be able to preserve the cause of the war. And it irks me when that cause is, "Well, we were wonderful, and they were jealous."
It rarely works that way. Sure, the persecuting group is probably wrong, but is jealousy really enough to make them attack? Or, if it had a root in religious war, how likely is it that the witches (this is a favorite group in feminist fantasy) worshipped a completely benign goddess and never did anything wrong, while their opposition worshipped a cruel male god and held blood sacrifices every night? There's black-and-white thinking translating into fantasy again. Even if the persecuted group thinks it's perfectly right, that shouldn't be the case.
As proof that fantasy authors I normally regard as shallow can do something right, David Eddings has a twisted and messy conflict in his Tamuli trilogy between the Styrics, the "good" magic-users, and the Shining Ones, a group of people whose touch melts flesh from the bone. They both think the other is to blame, and neither knows the truth about what happened in the past to set such a deep rift between them. They scream and curse at each other, and both accuse the other group of lying. This is especially interesting given that the Styrics in the first trilogy were represented as the completely persecuted, completely right magic-using group.
That I still remember this so well, years after reading the trilogy, says something about how much I admired it. Eddings could have taken the easy route out and made the Styrics good again and the Shining Ones irredeemable, but he chose a different way, and it worked much better.
4) The group need not be teleological. Often, secret societies in fantasy seem to hang around waiting for the Destined Heir to show up so they can tell him secrets and accompany him on the quest, or give him his Quest Object. But, as we can see from our own history, people often aren't content to wait on the same goal for long periods of time, or stay exactly the same over hundreds of years. Christianity evolved a church structure partially because early Christians realized that Jesus wasn't coming back immediately, and the world appeared determined not to end. Your secret societies will probably have found other means to occupy their time than sitting around and waiting for the Heir.
They don't even have to wait for the Heir at all, especially if they're the last remnants of a persecuted group. Perhaps they have bucked the usual trend and changed to fit in with the land they fled to, instead of continually mourning for their lost homeland. I liked the way Tolkien handled this with his Númenoreans. Though many of them would still claim pride in their heritage, they got used to thinking of themselves as citizens of Gondor and Arnor, not citizens of their lost homeland.
Your group doesn't have to have a destiny or goal in mind, or not the original one. It can be enough for it to go on existing, and it can develop methods simply of doing that.
5) Decide how powerful you're going to make the opposing forces, and stick to it. It drives me insane when the bad guys learn where the good guys are only when it's convenient, such as when they've already told the hero all he needs to know. It drives me batshit crazy when the author has already announced that the evil group can do such and such- they could track the good guys to their lair if they found them, but they can't sense them doing magic- and then reverses herself, so that the bad guys come howling down when the society does magic. Unless you're going to explain this later, like saying the bad guys got themselves a fancy new mage, don't do it.
It also strikes me how stupid the Powers That Be seem when the group takes almost no measures to protect itself, and yet never gets found. And yes, this includes witches doing magic in remote corners of a kingdom which has banned magic. If everyone has been trained to hate witchcraft and the kings are always on the watch for it, how stupid are these women to do it right in the open, no matter how far from the court? Someone would report them, and good riddance, too. I've said it several times before, but it bears repeating: Good guys shouldn't be able to win or exist just because the bad guys are idiots.
Which reminds me.
6) Sacrifice pride to survival. If the distinctive sign of your persecuted group is that they all have red hair, I will expect head-shaving, hair-dying, magical illusions, wigs, and so on. I will not expect your red-haired mages to continue being red-haired out of some silly-ass pride. Any distinctive group that was intent on enduring hundreds of years' worth of hate would have to sacrifice pride to survival, or they would be wiped out within a few generations. And again, good riddance.
I've read too many fantasies where the heroine keeps some identifying marker out of sentimental value, even though the bad guys are searching people for such a marker hither and yon. I can accept that someone would want to keep such a trinket; I can't accept that someone who knows that she must survive in order to accomplish her mission keeps it stubbornly, in spite of the danger of being found and killed. Again, the usual authorial solution is to make the bad guys stupid. They don't search her for whatever contrived reason (usually the heroine flirting with them and discouraging them that way), and she waltzes through flowers while maintaining the stupid sentimentality.
The Evil Overlord List is right. Any Dark Lord worth his salt would start searching for people with markings of gulls on their bodies if they knew that their opponents had that marking, and the heroes would be suicidally stupid not to cover them up, no matter how proud they were of their heritage.
This has been your daily rant against stupid characters surviving because authors cherish them, the ditzes.