Depending on the tech level of your world, I see a few different solutions being plausible.
(as mentioned by A.C.A.C. in the comments) reduces the amount of complexity a person's brain can handle, by simply cutting out a portion of the physical brain. Lobotomies were widely used as a treatment for mental disorders in the 1940s and 50s:
They achieved their effects by "reducing the complexity of psychic
life." Following the operation, spontaneity, responsiveness,
self-awareness and self-control were reduced. Activity was replaced by
inertia, and people were left emotionally blunted and restricted in
their intellectual range. (from wikipedia)
One scientist referred to lobotomies as "surgically induced childhood," which would certainly be a solution to a criminal having too much intellect for their own good.
2. Brain-eating creatures
In some universes there are creatures that feed upon the brains of humans, while leaving the rest of their bodies intact. For example, Mind Flayers in D&D or Ceti Eels in Star Trek both affect the brains of sentient beings in a very damaging way. However, this method has the greatest potential for getting out of hand and reducing the victim to a vegetative state, or killing them completely -- therefore, those inflicting the punishment would need to exert strict control over the creature that was unleashed on the victim's brain, stopping them as soon as their brain has been damaged enough.
3. Intellect-affecting spells
If magic is a part of your world, a permanent variation of a Confusion or Curse spell could very effectively prevent their scheming. Another option is a spell of Bad Luck, which if powerful enough (and again, permanent) could effectively prevent them from making any significant intellectual breakthrough, thus foiling all their plans before they even happen.