How did she justify these things to herself?
1) Most of the people probably were guilty of the crimes they were accused of. A technically faulty conviction means legal innocence, but not actual innocence.[1] Everyone deserves due process, obviously, and "probably" isn't good enough to convict someone, but it is something that can help someone like this rationalize their actions. "I'm just helping get a conviction this guy deserves anyway."
2) Like most people involved in the criminal justice system, these are not sympathetic people. Prior convictions, prior jail time, gang affiliation, etc. You can imagine her rationalizing by saying that even if the accused weren't guilty of the specific crimes against them, they were guilty of something.
Obviously I'm not trying to justify the actions of the chemist here. The criminal justice system has due process and protections and those things are important. But the fact of the matter is that most people who are brought through it are not "good people." That's just the nature of the system. The police don't arrest random law-abiding middle class people and pin crimes on them. For people who work in police work and prosecution, it's a constant parade of various degrees of unsympathetic characters. That's the psychological environment in which this chemist was working. And again, without justifying her actions, if you're trying to understand her psychology, that's where you need to start.
The Nietzsche quote is appropriate here: "And when you gaze long into an abyss the abyss also gazes into you."
[1] This is something I think people have a tough time grappling with. I have friends who do work on wrongful convictions and prisoners rights. It's extremely important, valuable work. But often their work involves defective convictions, not people who are truly innocent (as a matter of actual fact, not as a matter of legal determination).