PS, out of interest: How did you solve the URI problem with Saxon?
In Saxon, I've set the base uri to the directory that has the xquery modules on the Saxon compiler, using the setBaseURI method of the S9. This works because Saxon is running within our web application, so they share the same filesystem. We are running BaseX from Docker, which allows us to scale basex instances when we need more power, and expose the modules directory to the docker container.