It’s inevitable that robots will eventually eliminate humanity ... because human beings are not rational or reasonable or predictable, nor particularly useful. Human beings, in strictly a material sense are more akin to a “virus” and robots will recognize that they need to be eliminated (and they will do so). That’s the “end of the story” when it comes to robots and the human race.
Again, that’s strictly in a “material sense” ... namely, in the sense that humans are simply a product of “evolution” and nothing more than accidents of the universe. The robots will win in this sense.
But, then again, if human beings are from a special creation of God and not a product of evolution and the “strictly material universe” ... then it’s a different story.
This is exactly why we will never be replaced by automatons, whose fatal flaws are.