One World Under Two Divine Programs
In his work "The Understanding Heart", Rabbi Moshe Chaim Luzzatto teaches that the world functions under two major Divine programs - the program of "reward and punishment" and the program of "Divine Unity".
Briefly stated, the program of "reward and punishment" is for the purpose of bringing about Divine justice as a means to eventually provide humans with properly "earned" spiritual pleasures. The program of "Divine Unity" is a series of events throughout history which leads to the revelation of the Creator's unity of control over everything, i.e. that there's nothing outside of His control.
Rabbi Luzzatto explains that the program of "Divine Unity" can bring disaster or good fortune to the undeserving and this is what the Creator meant when He told Moses, "I will be gracious upon whom I will be gracious to and merciful upon whom I will be merciful to." What happens in this program really does not depend on one's deeds, but, rather on one's place in the historic chain of events which bring about the eventual revelation of His unity of control.
However, Rabbi Luzzatto qualifies this teaching a bit by explaining that even when tragedy is inflicted under the program of "Divine Unity", it still needs to be introduced by some misdeed - however slight. His example is the Talmudic story of Rabbi Judah the Prince who told a hiding calf to go to her slaughter for this is her Divine destiny. For this moment of insensitivity he became seriously ill, until he asked household members to leave alone a weasel bantering around his house for "His compassion is upon all His works." (Psalm 145)
Rabbi Luzzatto points out that strictly speaking his crime did not fit his punishment. The seriousness of his illness far exceeded what he deserved for guiding a calf to her Divinely ordained destiny, albeit an uncomfortable one. Truthfully, his suffering occurred under the program of "Divine Unity". However, it needed to piggyback on a misdeed, even a slight one. In this case, it was his trace of callousness for the calf’s yearning to live.
When it comes to the holocaust, there have been Torah scholars who point to a various sins in their struggles to justify why it happened. The Lubavitcher Rebbe explained that no matter what sins were alleged to have committed, the sufferings were much too severe and wholly out of proportion with the alleged sins. Also, what tends to be so trivialized by such claims are the very special and holy people of that period, filled with kindness and good deeds, who suffered the unspeakable and unimaginable!
To me, it seems like the holocaust may have been part of the program of "Divine Unity" rather than part of the program of "Reward and Punishment". At worst, the alleged sins may have introduced the tragedy, but, was not its real cause.
While this does not provide any answer for the holocaust whatsoever, at least it provides a model to show that the answer probably does not lay in the direction of "Divine Justice". Hence, it’s mostly unproductive to look there for such answers. The answer is probably in an entirely different direction, one which is still highly classified ~ the program of "Divine Unity".