If I'm playing the Yor
You're playing the
Yor.
Don't try to tell me Loyalty is still bugged-seems to work well enough in the latest DA, though I haven't tested it extensively in TA. Again, it's not the end-all, be-all, but it's still significant.
How about a check box for preserving backstory a la victory conditions?
Your points on the AI are valid, though I personally don't see much of a problem with it, relating to this issue (and I call myself a coder, though I may not be up to Stardock's standards). I can, however, say that I believe the AI can indeed handle it.
Again, the question of custom races rears its ugly head, but in general custom races A) do not have a backstory or

have a backstory of one of the existing civs due to being based off of it, i.e. an evil-based Terran Alliance, etc. This being the case, the generic custom races shouldn't be relevant with regards to backstory-specific victory conditions (or the preventing thereof), while the ones based around an existing civ can just use a flag to specify which race they're based off of. Player-selectable is the only thing that makes sense in this regard, however, as the game cannot be expected to be intelligent enough to aptly choose one.
After all, if you're playing as a custom that has its backstory based on the Thalans, wouldn't you want the game to recognize it as such, rather than, say, the Yor? Is it more useful to not be flipped by the Terrans, or by the Iconians?
And really, if you care that much for backstory (which there is a time and place for, and I love it, but I love playing the game more), why be concerned with which is more useful to you, rather than that which is consistent with the backstory?
As far as the idea of the backstory consistent victories option goes, I could take it or leave it, but it does sound interesting.