Hi Ioan,
I started from the idea that Tomcat is a "container" of applications, many and distinct. And that too would not make sense to multiply BaseX for n times (with all its libraries and probably some resource consumption) within it.
It would be interesting to see what other Tomcat users think about this. My experience with Tocat is rather limited, but I am not sure if your scenario could really work out. I can clearly see the motivation behind your planned architecture, but maybe it could be worthwhile to find out if it's a real bottleneck to deploy 3, 4 BaseX instances.
I do not really understand also what and how to use repopath setting (alongside numerous other things that do not know!). Repopath could help us with something on this line?
I invite you to check out our documentation [1].
Cheers, Christian