Steam Deck natively recognizes the PS3 controller. Simply plug it in via USB, wait for Steam OS to recognize it, then unplug USB cable and it will work over Bluetooth without needing
PS3 Controller Fix, Random Button Pushes - YouTube
PS3 Controller Problems (easy fix for random button pushes, left analog) - YouTube
Debacle: I've bought several used PS3 controllers and they all are useless because they operate all on their own, performing directions and pressing buttons, nonstop, as if a ghost is doing it.
Guide to Fixing Common PS3 Controller issues (Random Button Pushes,Not Syncing,Replacing Battery) - YouTube