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.