And what nazi germany could have done back then, to not have it broken would have been very simple: not using prussian style of communication, meaning all the messages followed a certain pattern with certain keywords. Since the british knew those keywords and pattern, they had something of an angle to break it. (Parts of it are covered in the article)
Or of course use another layer of encryption (but that requires a simple redesign) which would have made the decryption not useful in a timely manner.
Better training for the operators would also have helped, e.g. don't start every message with "Heil Hitler". Some of the services were much better than the others IIRC.
The Luftwaffe were far more lax in their procedures, and Hermann Goring sent many trivial messages that made it easy for Bletchley Park to decrypt.[1] From early 1940 to the end of the war, air force messages were routinely read.
[1] From https://en.wikipedia.org/wiki/Cryptanalysis_of_the_Enigma: "Luftwaffe chief Hermann Göring was known to use it for trivial communications, including informing squadron commanders to make sure the pilots he was going to decorate had been properly deloused."