Next 3.1 beta will "remember" Game Ports panel selected input device even if it is not available when config is loaded and will automatically insert it in original virtual joystick port when "missing" input device becomes available (inserted, powered on, whatever).

Custom configs/Input panel + missing input device is not (at least not yet) supported. It gets much more complex.