> But people who made a good-faith effort to do something legitimate and turned out to be mistaken? There's no real precedent for punishing those
Yes there is, if they failed to thoroughly consider the consequences of their actions, then we would call it negligence.
In law this is called "mens rea", or "guilty mind", and it exists in a hierarchy: Accidental, Negligent, Reckless, Knowingly, Intentionally, and we punish people differently based on which level of guilt they have.
There's another axis that courts consider when deciding charges and sentences called "actus reus", or "guilty act", and it's supposed to be represent how responsible the person is for the harm rendered. This also exists in a spectrum, from "proximate cause" (you did the thing that immediately caused the harm) to "coincidence", (you stabbed a voodoo doll, and the person got hurt, with no chain of causality linking the two events)
I would argue that Facebook engineers were negligent with respect to, like, the fake news fiasco, though probably not very responsible, being enablers rather than actors. Same with the racial loan targeting scandal.
The depression experiment, I would call reckless and a proximate cause of whatever harm was done. There is no way in hell that a secret experiment to make people depressed by manipulating their news feeds would pass an IRB, and Facebook should have been punished for it.