If you’re going to create a science fiction world, you cannot snatch up a random ancient culture and toss it into a universe in which interstellar travel is relatively widespread, servant robots are efficient and plentiful, and so on. If you want something like slavery to exist in such a world, you have to have a damn good reason for it beyond “they just don’t like them.” You have to adapt such things to technology. Otherwise, you’re completely ignoring the impact technology has on the development of culture.
This is not the same as taking an analogue of a European medieval culture and inserting it into a fantasy world (unless, of course, you have a lot of magic and have made no effort to demonstrate how magic changes the cultures of a medieval society). There are at least reasonable assumptions one can make about early technological developments in human cultures. But it does not work in a science fiction universe as a cultural standard.
This is one of the few things that will make me toss a book across the room: when your world makes no sense.
Mashing together ancient cultures with advanced future worlds simply does not work. No matter how hard you cram an eagle into a pig, you will not come out with a flying pig.
Sadly, a lot of people try to do this, and their books suffer as a result, because the moment I stop and say, “This doesn’t make any sense,” is the moment when I’ve been pulled out of the story. It won’t be easy to go back after that.