Update: I completely forgot to mention how we deploy the application.
Now we are using the included docker image for version 4.7.0 to ship the app.
running the app localy creating, editing and logging in as the api user works, but inside the docker container we get the same
TypeError: Cannot read properties of undefined (reading 'complexType')
Maybe because we are using a PostgresDB with the container instead of fs.
We also ran into the issue of chrome-pdf timeouts, which somehow got fixed using the 4.7.0-full image instead, the api issue persists.