I used the QuickOSM plugin in QGIS to get the postcode boundaries from OpenStreetMap, because I only realized now that govdata.de has the dataset I needed for this. I then calculated centroids and wrote a python script to connect adjacent postcode numbers with lines. There are lots of unused codes and a few gaps, so you're only seeing 8.218 lines.
@koriander next up: the same but for telephone numbers?