When you find yourself trying to remember a show (or any works) that's on the tip of your tongue but just out of reach, come here - the collective brain of the TVTropes community can probably help. Post all the details you can remember (examples help). If you're looking for a trope, head over to Trope Finder. Have general questions about tropes? Visit Ask The Tropers!
If you are messing things up a little, could be it "Automata" - 2014 ???
This does remind me of something I stumbled on while zapping. It has humans in a prison after an invasion by "the new masters", and the personnel was actually androids. As the director explained, they were old machines now, and broke down more easily.
In the end, it's revealed the "new masters" had left or died out years ago, but the director kept the people imprisoned because that's what he was programmed to do.
Unfortunately, I have no idea as to the title. But I think there was a closing narration, so it could have been a Twilight Zone / Outer Limits episode (the latter is unlikely because there was no Cruel Twist Ending).
"And as long as a sack of shit is not a good thing to be, chivalry will never die."Apparently, it was The Outer Limits anyway.
"And as long as a sack of shit is not a good thing to be, chivalry will never die."Can't be Automata, since I must have seen this quite a while ago. Medinoc, that sounds more like what I remember, I'm going to look into it.
Confirmed, it's The Outer Limits (1995) episode The Camp.
I don't remember much, but I think the robots were disguised as humans, with very few people knowing that they were in charge. I think there was one woman who was trying to get close to the leader of the robots. At some point the leader was damaged, possibly it the face, revealing his true nature. I'm also pretty sure the ending had the humans coming out of whatever structure they were living in, into the outside world, and ended there.