The Dosadi Experiment by Frank Herbert

An operative from an interstellar legal and political authority is sent to a sealed, toxic planet where an isolated population has been subjected to a long-running, ruthless social experiment; he becomes entangled with local leaders, uncovers layers of manipulation and clandestine control, and must confront the moral, legal, and survival implications of freeing a society forged under engineered scarcity and violence.

Purchase from Bookshop.org