I did some further testing yesterday:
I unplugged my wireless keyboard-mouse combination and used s single wired keyboard. I also unplugged my xbox-gamepad and left only two GPIO-Joysticks.
Because it is not possible to use these joysticks inside Retropie (not enough buttons), I quit to shell and started UAE4ALL2 manually.
And guess what? I could start Great Courts II and play a two player game with both joysticks.
This was my expected behaviour after looking at the source code.
No matter what, port 0 is mapped hard to /dev/input/js0 and port 1 is mapped to /dev/input/js1. Before, js0 was my xbox pad and there was some strange behaviour when a mouse was connteced, which got mapped to port 0 too.
In this test, GPIO-Joystick1 was js0, GPIO-Joystick2 was js1 and everything worked fine.
My test was done with chips UAE4ALL2 version 5. I had some problems with UAE4ARM (no button click), which needs some further testing.