The law is often murky when it comes to self defense or defense of others. There is no question he was within his rights to defend his daughter against grievous harm and sexual assault generally has its own separate defense along with defense of bodily harm.
I'm not privy to the facts. Generally if there is a breech of your home or car then you can use deadly force. Texas is one of many states that is a stand your ground state ie, you do not have to retreat first. Here the case is defense of another human being from grave injury or death and in this case also sexual assault.
Generally you may only use justifiable and proportional force to prevent injury or death. Once the attacker is subdued, retreats, or is incapacitated then you may not proceed to cause further injury to as assailant.
If the guy was helpless and then he went and got a shovel and beat him to death then you have a clear violation of the law. There is no justifiable homicide defense that includes vengeance in the US. Again though I don't see this being either prosecuted or him found guilty of anything serious. The victim was a four year old child! A lot will depend on all the facts.
If he killed him in a vengeful way I do worry some about a civil suit for wrongful death. I hope that is not the case. I doubt a Texas jury would award anything and/or find for the plaintiffs should that happen but it would be an expensive defense not to mention mentally exhausting.
Prayers to that little girl who has been traumatized and to the family. Hopefully she will be one of those victims that triumphs over the sequalae of this vicious and unconscionable attack.