To add to this question, these are the .htaccess mod_rewrite rules that do the magic for allowing subfolders being used:
RewriteCond %{ENV:REDIRECT_REWRITTEN} !=1
RewriteCond %{ENV:REDIRECT_REDIRECT_REWRITTEN} !=1
RewriteRule ^([a-z]{2})/(.*) /$2 [L,QSA,E=REWRITTEN:1,E=LOCALE:$1]
They translate https://domain.com/de/someurl/ into https://domain.com/someurl/ and add ENV variable REDIRECT_LOCALE = de