Since I do not think that G-d has emotions and since I agree with Maimonides that G-d does not become angry, it does not make sense that G-d would punish innocent people for generations. I take another approach.
I think Maimonides answered this well. I just read an excellent essay today by Professor Warren Zev Harvey about Jewish views of evil. In the essay, Harvey reveals that Maimonides felt that the Babylonians and Romans destroyed the Temples because Jews focused on bad theology, not military preparations (Art of war). Thus, Rambam writes that all evil is the deprivation of knowledge. Rather than attribute the evils of the world to devils or satans, Rambam points evil to humanity. It is man’s responsibility to repulse evil. And it is man's fault for bringing evil into the world. Not a cosmic force.
This is also the view of Rabbi Dr. Eliezer Berkovits. He felt that “because of our sins,” was “[no longer] a satisfactory explanation.”
The verse, “and that by no means clears the guilty; visiting the iniquity of the fathers upon the children, and upon the children’s children, unto the third and fourth generation,” means that people should realize that every act, whether good or bad has consequences. People should be responsible because some actions can have long-lasting effects that may last for generations. Before the Native American Indians made any decision or new policy, they would always consult their wise leaders and took into consideration at least seven generations in the future. This wise teaching can be found in the Bible.
 I credit this to Rabbi Natan Slifkin who pointed this out to me in Rambam’s letter to the Jews of Marseilles
 See his book G-d, Man and history, Crisis and Faith. And Major Themes in Modern Jewish Philosophy