I often wonder why the Germans (and Japanese) simply didn't just assume their encryption was broken and regularly create new systems.
For the U-Boots, there were few enough that one-time pads would be practical, and unbreakable.
There are also ways to set traps to see if your code was broken.