I've been fighting this same problem today. I have a bunch of different RetroLink controllers (Atari 2600, NES, N64, Genesis) and they all overwrite each other. My workaround was what @meleu said. I had to hardcode the mappings for each specific retroarch.cfg file and then I configured the NES controller through ES. The fact that you can hot-swap controllers makes it not too bad. I just use the NES controller to navigate and once I fire up a ROM, unplug it and plug in the proper controller.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.