You'd think it would have been less prone to sabotage if it was in Germany rather than in an occupied country.
They didn't have a nuclear weapon program. They had a nuclear reactor research program. And it was, on the whole, located in Germany.
There was a plant that produced heavy water, a component used in some nuclear reactor designs, in Norway. It was there before the war started. This thread goes over the history of the plant. The Germans just wanted the output from the plant.
Could the Germans have built a dedicated heavy water production facility in Germany? Sure. If they had really been dedicated to the project, with proper funding and manpower, they probably would have. The US built three heavy water production plants during the Manhattan Project (and had access to another one, in Canada), even though its main reactor designs did not use heavy water. But this is the difference between a nation that has an extensive effort to build an atomic bomb (the USA), and a nation that has a very modest reactor research program (Germany).