As I understand it, lethal injections are designed in such a way to paralyze the victim but the actual process is actually quite grueling, the victim just loses the ability to indicate the level of distress and pain they are in. This is unlike the euthanasia vets typically administer, which start with a sedative so the animal is unconscious, which seems not to be desired for executions.
So I guess there are parallels, the Zyklon B story just doesn't serve as a contrast but rather another example: it was designed as a delousing agent but its ease of use, storage ability and relative safety enabled the industrial scale mass murder even if none of the engineers would have agreed to that. Of course to the company producing it, it was just another big government contract.
EDIT I remember my source it was that news show with the English guy .. John Oliver … he was doing a special on how brutal death by lethal injection was. That it wasn’t humane and it wasn’t developed scientifically because you could never get medical scientists to develop such a thing, and he drew parallels to cyclon B. He could well have been perpetuating that myth or his researchers could have been.