I always think such things are fascinating, but the older I get the more I wonder how much is really stuff that the animal knows and how much is more a result of other factors. Eg it might be that it was a colt not a filly and the male decided to reduce the competition; etc...
The number of potential variables is quite large and often I think that we miss some of them when we find one that seems to fit. Especially with tales like this because they stick in the mind much more readily as an example and explanation; and from there they spiral out to self propagate as a fact.
Of course if its true or not its still interesting; but one area where I really hope there's some in-depth research into; if it is true then it unveils a whole aspect of some animals and their ability to understand parental hereditary in a way which we can't - or of course it could be as simple as the newborn had a physical feature akin to the sires that the aggressive male recognised. Something that we might overlook unless we were very in-tune with zebras (and likely those specific ones).
There's also the complicating factor of differences in our capacity to sense the world around us. Things we take for granted such as sight, sound and smell are vastly different animal to animal. So we might be oblivious to signals that are very blatant to other species because of how they perceive the world and thus how they interpret it.*
*I'm reminded of dogs and the colours that they can and can't see easily and how a red ball in grass apparently looks very similar in shade; thus a dog might miss a red ball; meanwhile a blue ball in grass stands out a lot more because they can tell those two colours apart. However from our perspective the dog is just being daft when it can't see the clearly obvious red ball. (note colours in this example might not be correct; the theory is but the specific colours might be different in actuality).
Heck even just our raised and high vision adjusts how we might see a scene unfold whilst an animal closer to the ground will get a very much altered perception of what they can and can't see; even if they had the same visual system we have.
Infanticidal males don't need to understand heredity, or even act consciously, for "when you take over a herd, kill existing offspring" to be selected for.