Although Hitler was monumentally stupid. There are numerous stories of how Germany's war effort was undermined by Hitler and his top men making terrible decisions. For example on the night of 5th June 1944 Hitler gave strict instructions not to be woken. As a result he was not told about d day. And due to existing orders the Panza divisions could not be deployed without his approval.
So what about the Holocaust? Well the Nazis believed that the world's was under attack from Jewish and socialist aggression. They believed that it was a massive and imminent existential threat. And that their actions were defending their country and humanity from evil. From this twisted perspective the Nazis actions were logical. They saw themselves as the good guys. The basis for all this evil are a few insanely stupid beliefs.
You're missing the point of Hanlon's razor. It does allow for malice, but only in cases where incompetence is not an adequate explanation. So there's no contradiction.
You are missing my point as well. Why is malice only a possibility when incompetence is not? It makes no sense. In fact, the malicious would definitely take advantage of situations where they could use incompetence as an alibi.