If you have low karma, then edits are reviewed by multiple people before the edit is saved. That's primarily in place to prevent spam, who could otherwise post a valid question then edit it a few months later transforming the message into a link to some shitty website.
Even with high karma, that just means your edit is temporarily trusted. It's gets reviewed and will be reverted if it's a bad edit.
And any time an edit is reverted, that's a knock against your karma. There's a community enforced requirement for all edits to be a measurable improvement.
Even moderation decisions are reviewed by multiple people - so if someone rejects a post because it's spam, when they should have rejected it because it's off topic (or approved it) then that is also going to be caught and undone. And any harmful contribution (edit or moderation decision) will result in your action being undone and your karma going down. If your karma goes down too fast, your access to the site is revoked. If you do something really bad, then they'll ban your IP address.
Moderators can also lock a controversial post, so only people with high karma can touch it at all.
... keep in mind Stack Overflow doesn't just allow editing your own posts, you can edit any content on the website, similar to wikipedia.
It's honestly a good overall approach, but around when Jeff Attwood left in 2008 it started drifting off course towards the shit show that is stack overflow today.