I leave everything plugged in, but Windows 10 randomly swaps my 2 PS360+ encoders. When it happens, I just unplug player two, reboot, then once everything is running the way its supposed too, plug #2 back in.
Sucks, but that's life.
If RetroArch and MAME adopted the (newer) trend of "whatever controller presses the start button first = player 1" thing that Windows games have all been doing lately, it would make life really simple.