The auto configs work by matching the “iProduct” value to the autoconfig file (I think!)
You can see it by typing “sudo lsusb -v”
Mine is
iProduct 2 USB,2-axis 8-button gamepad
This maps to:
input_device = “USB,2-axis 8-button gamepad ”
in my file:
/opt/retropie/emulators/retroarch/configs/USB_2-axis_8-button_gamepad.cfg
As you say, you would want to avoid editing retroarch.cfg for controller info if you can help it.