I agree it does seem like collectivised punishment and that is wrong. The fault for this lies with the leadership of the village.

Should Itachi, as a soldier, have then rebelled against the command structure and leadership? Should he have sided with the Uchiha or as the situation was complicated simply sat this one out? Perhaps he should have.