Those three elements were taken from Akira Kurosawa's The Hidden Fortress. There weren't robots, but there were two characters who serve the same function, often as comic relief in the background, but also coming through in some heroic way when it counts.
Yes, but not a damsel in distress. A trope that has a name from the other stories.
Star wars uses old tropes. Dune uses old tropes. The key is they both did it on ways that tell a story that lots of people found interesting or entertaining.
Well, the Butlerian Jihad was a big influence obviously, and later in the series they end up fighting some leftover AIs from that era. But yeah, a very different take on robots between the two