I've partially solved this myself (if I manage to fully solve it I'll edit this answer, if that's the right etiquette):-
- My black Playstation controller was switched On under the Applications>Settings>Mouse and Touchpad>Device dropdown menu.
The red and white Playstation controllers were switched Off, which must be why only the black controller was working. It seems that on Xfce (or at least on this system) the joystick.conf rules are ignored in favour of this UI and presumably the UI is editing a config file somewhere else on the system that I haven't seen yet.
On closer inspection, the Xbox controller seems to be made into a mouse+keyboard by Steam, rather than behaving this way from startup. The Xbox controller isn't listed in the Mouse and Touchpad dropdown menu I mentioned above.
If Steam is closed, the Xbox controller continues to act as a mouse+keyboard. But anecdotally I think Steam probably isn't expected to cleanly return all the devices to their former states when it shuts down. I don't plan to debug Steam, I can live with rebooting after closing Steam, or perhaps I can find some script to reset all the mouse+keyboard devices.
==
EDIT (26/10/2022 - 19:30 GMT)
- In addition to the above, I have made an additional udev rule to try and fix each gamepad to a specific js# device ID, following the advice on this page: https://ubuntuforums.org/showthread.php?t=1595666
And also I installed an Xbox controller driver from https://github.com/paroj/xpad
After this, for various games that weren't detecting the controllers, I found that this could be fixed by reinstalling them or changing which versions of Wine or Proton they used. Although I remain very confused by how many different places the settings are saved in, and by the multiplicity of ways different games can approach gamepad support (e.g. whether they refer to event# numbers or js# numbers), the Ubuntu-side difficulties I think are mostly resolved now.
- The udev rules recommended on various forums were having no effect at all for my system. On my system the important things are (i) whether Steam has been opened and allowed to apply its Desktop settings to the controllers and (ii) the 'Mouse and Touchpad' UI in the Xfce Applications menu.