Particular sins result in latae sententiae excommunication. They're spelled out in canon law.
One such sin is a violent attack on a priest or religious. When Hitler ordered or approved the shooting of priests during the invasion of Poland, that qualified.
Almost every autocratic ruler in history has had problems with priests, it’s the nature of the beast. You’re saying they all were excommunicated?
I’m sorry, but all sins cause man to fall short of God and all sins can prevent one from Heaven, according to Scripture.
If Hitler wasn’t a Catholic, then he had nothing from which to be excommunicated. He, if never accepting of God and Christ, would be destined to Hell, regardless of the praying of people after his death (perhaps while in Purgatory).