I think it's still controversial whether manufacturers of substances are morally culpable for the result of people wrongly using them. And while you could hold the marketing or executive team accountable for trying to get people addicted to heroin, I'm not sure the same applies to programmers of an inventory tracking system?
Controversial in general, maybe. In the case of opioids and the pharm industry, absolutely not. It's been well documented at this point that pharm companies were well aware of the abuse, and not only did nothing to stop it, but went out of their way to encourage it because sales were going through the roof.
In the case of Purdue and oxycontin, the culpability has in fact been established in court as well.
As for the coders, I find it hard to believe that they were so ignorant, naïve, or unintelligent that they had absolutely no idea what was going on. I just don't buy it.
Regardless whether the rest of society finds the programmers responsible, the integrity of that society depends upon programmers in such situations holding themselves accountable. Apparatchik or moral agent? That choice remains ours.