So it turns out, this is kind of a long known gab in the redirect module.
For us it worked with patch #42 in the redirect module (using cweagans/composer-patches composer library) and then importing the redirects using migration. This is what worked for us (massive thx to this example):
id: custom_redirects
label: 'Import DE urls as redirects to the node'
source:
plugin: url
data_fetcher_plugin: file
data_parser_plugin: json
# ... and the mapping, I spare you the details
constants:
status_code: 301
redirect_prefix: 'internal:/de/node/'
process:
temp_nid:
plugin: migration_lookup
source: jiveid
migration: custom_contents
language:
plugin: default_value
default_value: und
redirect_source:
- plugin: substr
source: url/de
start: 1
redirect_redirect:
plugin: concat
source:
- constants/redirect_prefix
- "@temp_nid"
status_code: constants/status_code
destination:
plugin: entity:redirect
migration_dependencies:
required:
- custom_contents
So with our example above this would end up with values:
process:
language: 'und'
redirect_source: 'docs/DOC-1763'
redirect_redirect: 'internal:/de/node/5'
status_code: 301
The migrate module (don't forget the patch) does then the rest and redirects correctly from /docs/DOC-1763
to /de/something/different
.