The way RetroPie manages this is by running an additional script after the input configuration phase - see here. The script then reads the es_temporaryinput.cfg file and generates auto-configuration for various emulators - see the script here.
You can probably create a similar utility (in Delphi/Pascal) that parses the es_temporaryinput.cfg file and generates configurations for the emulators you need.