With a proper species system you could just say race horse can only marry and have kids with other horses and the hardcoded marrige and fertility systems would handle it automatically.
Yes, this exactly.
I know such a feature would be almost useless in vanilla ck2. But there are a lot of big overhaul mods that are based on fantasy. Most of them are based on fantasy actually, and such a system would make all those mods a lot cleaner and the job of the moders a lot easier.
Or at the very least, as I said, give us a culture based marriage restriction. It would not be as clean as a species system, but it would at least be a huge improvement to the current system where if a dragon and an orc have different cultures and different race traits, but they both, let's say, follow the same god, they will get married and produce offpsings. And the amount of maintenance events you have to write in order to take care of that are not only a lot of work, but they also slow down the game after a certain point. So a culture restriction combined with the current religion restriction would make that a lot easier.