The intuition that machines cannot be as ethical as humans is likely incorrect. Ethics is the systematic resolution of conflicts of interest under conditions of shared purpose. Ethics is not irrational. There is no reason to assume that machines cannot be more ethical than us.
It depends on whether they model them as sharing a purpose with them and would have a preference for acting on that purpose. The same criterion determines it in humans.