People of the Link
A beautiful and apparently prosperous civilization living with a protected bio-dome on P3X-289, which was unknowingly controlled by a computer network capable of altering of their memories. On the surface the people are harmless and genuinely welcoming. Each couple was allowed a maximum of two children to control the dome's population growth.
Originally, everyone who entered the dome to survive from a planet-wide cataclysm signed a contract to connect to the Link. After the people were wired, they were incapable of believing in anything the machine did not wish them to. Originally the dome contained a population of over 100,000 individuals. At last count they were down to less than 1,400. The town's entire population was at the mercy of the Link, and could not be trusted.
With the aid of Samantha Carter, the native Pallan reprogrammed the Link to wipe away any memory of SG-1, who had become a threat to the computer network -- which had been systematically killing the locals by causing them to leave the protective dome for the toxic wasteland beyond, in order to accommodate the continuously-shrinking dome. Finally free to learn the real truth of the population management and the murder of tens of thousands, the remaining people left the bio-dome with SG-1, bound for a new planet where their civilization may thrive once more.
Revisions - SG-1 encounters a people happily surviving within a bio-dome, linked to an underground super-computer that has the capability of providing for all their needs -- and altering their memories.