You may have posted to the wrong forum - RetroPie is a retro-gaming oriented distribution, based on Raspberry Pi OS (and for the moment it's not supported on the RPI OS 'bullseye' release).
If your PS3 controller is already working, then probably you'd have to look into how the program used to read the inputs from it works with your telescope controls (connected via GPIO perhaps?). It may be that it's no longer functioning with 'bullseye' for various reasons, but without details on how this program works, it's just a guessing game trying to diagnose the issue.
Also I have experimented a problem about gpu_mem, when you set it to 256 (which i don't really think is reasonable for pi zero 2, but I have tried) then emulationstation is not loading, instead it is in a constant 104% cpu using state.
I'm totally happy to do some extra installing/building if that would help.
If I build SDL2 from source repo, would I be able to fix this up without too much editing of cmake files etc?
(i do need to use Bullseye unfortunately)
I think long term, it's much better for Raspberry Pis to have a) an open source graphics stack, and b) a more 'standard' solution. as an educational tool it seems silly for the pi having bespoke APIs, and it meant that (as above) several pieces of software ended up being tied to that bespoke ecosystem out of convenience/necessity.