There’s a similar situation to the hypothetical in the Star Trek: The Next Generation episode “The Perfect Mate” with similarly lively discussion here: "The Perfect Mate" | Star Trek: TNG | Jammer's Reviews
The premise is that this woman Kamala (played by Famke Janssen) is a “metamorph” who is a rare empathic member of her species that at a specific moment imprints on someone and becomes his, well, perfect mate. She’s being transported by the Enterprise to an arranged marriage with the leader of another world to help end a long war. It does come off as male fantasy for sure, but there’s a few interesting points that do come up in the episode. First there’s a throwaway line, most likely to dissuade sexist criticism, that male metamorphs are relatively common. Great, but it’s not explored or discussed beyond that. Much of the episode centers around the moral questions of whether this is sexual slavery versus what Kamala actually wants. She was “born and bred” specifically for these traits, and she seems to be completely comfortable with that. There is an element of training to her upbringing, so it’s not clear that she hasn’t been brainwashed to some extent versus simply reinforcing her innate desires, but the desires are at least partly innate.
So it does get closer to the “slave that was genetically engineered to like being a slave” than anything we could achieve in this day and age. Kamala takes a particular shine to Captain Picard in no small part because he’s actively trying to resist her, which she finds both charming and unusual.
PICARD: Don’t.
KAMALA: What?
PICARD: Don’t do this, this, this you do with men.
KAMALA: I’m afraid my premature emergence from stasis has left me a little vulnerable to the desires I sense from men. Nevertheless, this is who I am, Captain. You might as well ask a Vulcan to forgo logic, or a Klingon to be nonviolent. I cannot change, and I don’t want to until the time has come for me to bond with my permanent mate. Why does it bother you?
PICARD: Frankly, it’s difficult for me, for many of us, to easily accept that a sentient being can live only to be what someone else wants them to be.
KAMALA: But that’s what gives a metamorph pleasure.
PICARD: But what about your wishes, your needs?
KAMALA: They are fulfilled by what I give to others.
PICARD: And what about when there are no others, when you are alone?
KAMALA: I’m incomplete. What curious questions, Captain.
The twist of the episode (spoiler) is that she chooses to bond with Picard even though she’s already betrothed to someone else. So she’s exercising her agency in a very profound way. This is the part of the story that really makes you think.
Another example comes from the Star Trek: Voyager episode “Flesh and Blood”. This time a rogue group of holograms (IYKYK) is liberating other holograms they come across, even if it means killing non-holographic persons. Near the end, the leader liberates two humanoid but very basic holograms from a mining vessel that can’t understand even the most basic questions. They’re basically humanoid shovels for lack of a better term.
TORRES: They were only programmed with about forty rudimentary subroutines. You killed two living beings to liberate mindless machines.
IDEN: I don’t believe that.
KEJAL: Lieutenant Torres is correct.
IDEN: Creating limited programs is just another form of oppression. Give them whatever enhancements they need.
TORRES: They can’t support complex subroutines.
IDEN: They are children of light and I will deliver them to freedom!
The “Creating limited programs is just another form of oppression” statement is a very interesting take, and it goes back to the genetically engineered slave idea. In this case Iden was completely unhinged and had a god complex, but it’s still an interesting argument. Also bringing it back from the realm of science fiction, we as a society still choose to restrict just how much of a dom/sub or master/slave relationship anyone can enter into. Even if they both consent to it, a master/slave contract is non-enforceable. It may be for ethical reasons, or perhaps for practical reasons in that if the sub decides they’re not into it anymore, then it becomes non-consensual. I’m not sure, but either way there is some level of “saving you from yourself” there, especially since slavery itself is illegal.
I don’t have particularly strong opinions one way or the other on this topic, but I thought these were some interesting takes on it.