Yes, there is absolutely a direct line running from systematically murdering over 11 million innocent people to incarcerating people or killing 2,000 people in a war.
The Nazis didn't cut roads or destroy infrastructure in the Holocaust, they methodically murdered a lot of people. I really don't see the comparison to the US prison system or to recent events in Gaza.
My point is that nobody can really blame individuals, who are protecting their ass, for participating on evil.
We probably both agree there is something wrong with overblown prison system. But we would hardly blame prison guard for participating. Also we would probably agree to punish prison guard who helps prisoner to escape.
Also some innocent civilians died in last Intifada, but nobody is demanding head of soldiers who killed those civilians.
You do realize that Hamas uses the infrastructure (schools, hospitals, etc...) for their attacks? It's safer for the IDF to shoot a rocket then perform a land operation.