Questions
How to remap controller buttons on a Mac
There are four places a controller button can be remapped on a Mac, and which one you want depends on how far the change should reach. Inside a game, for that game. In Steam, for Steam games. On the controller itself, for the DualSense Edge and Xbox Elite. And system-wide, with a mapper, for everything.
In the game
Most native Mac games with controller support have a controls screen. It is the simplest fix when a game gets one thing wrong, and it only affects that game.
In Steam
Steam Input remaps any controller for any Steam game: the controller icon on the game's page, then the layout editor. It can even send keys, which makes it a mapper for Steam games specifically. It does not reach games outside Steam, and on the Mac some games ignore it.
On the controller
The DualSense Edge and the Xbox Elite Series 2 store remaps in the pad itself, set on a PS5 or an Xbox and carried to the Mac. Handy for swapping the paddles; useless for anything a stock pad does not have.
System-wide
InputConfig remaps every button, stick, trigger, and touchpad to anything: a key, a shortcut, a click, pointer motion, scrolling, a macro, a MIDI note, a system action. It works in every app, not only games, and a preset can switch itself in when a given app comes to the front. Press Scan, press the button, pick the output. Remaps can be chords (hold one button and another does something else), holds, double-taps, and turbo, all per row. It is free and open source.
Questions
Can I change what the buttons do on a PS5 controller on a Mac?
Yes. In the game, in Steam, or system-wide with InputConfig, which can make any button send any key or action.
Can I swap A and B, or make a trigger a button?
Yes, in a mapper. InputConfig treats triggers as analog or as buttons, whichever you bind.