AFAIK there is no elegant solution. You will need to write custom dial plan to normalize the formats.
Use the context from-pstn-toheader in extensions.conf as a guide. Put a modified version of that, named e.g. from-pstn-normalize-did, into extensions_custom.conf, then change the context for your trunk to from-pstn-normalize-did.
You don’t have to worry about tel vs. sip or what comes after the @, but you do need to properly handle the case where the @ is not present.
Also, if you have DIDs in other countries from the same provider, you might see e.g. 0033123456789 for a Paris DID, which your dial plan will have to normalize.
True, but Germany has variable length numbers and DIDs in different cities would likely have different lengths. Also, if the OP has DIDs from other countries, length would obviously vary.
You can then cut on : and work with field 2. an expanded version of the from-pstn-e164-us modified for Germany would be a good place to start, selectively remove the prefixes appropriately to leave just the ‘national’ number,