... and I'm not saying "group" punishment should be used in all instances. If you've been in the military, you know how effective group punishment is - and the group generally doesn't resent it because it builds group solidarity oddly enough, tapping into some deep psychological seams in us as human beings. However, it steers the group strongly towards conformism.
No, I'm saying this is one of those last resort things you need to have on hand when you have to deal with true sociopaths.
You can't really keep this kind of power of punishment under check, so I don't recommend it for a code of law. You really need a benevolent tyrant to execute this kind of thing.
As for the "regardless of guilt" issue, the reality is that almost all criminal instances, in the investigation, the prosecution and the sentencing, there is a tremendous amount of "slippage". Bad people don't get caught, good people get mistakenly caught. People get over sentenced or under sentenced, whatever that means.
So there is a tremendous amount of collateral damage that goes on within the legal system anyway. We prefer not to have it spelled out for us and codified, but it is there. We don't want to get into the business of openly sanctioning collateral damage through group punishment because it violates individual rights, but lets not get too aghast at the actual quantum of collateral damage we're talking about here - only the money from two dozen relations, not jail time. This is peanuts compared to the normal level of daily collateral damage in the criminal justice system.
A lot of concepts behind those thoughts - but basically this is for if I was *King*

ie a monarchy.