I just bought a cheap Sony Blu-Ray player (non-UHD), and there were no settings in the menu for configuring audio formats supported by whatever is connected to the other end of the HDMI cable. Despite that, it works perfectly, sending only what my AVR supports.
It also does the same thing if connected directly to the TV, where it decodes and down-mixes instead of sending TrueHD, DTS, etc. So, it’s at least possible to do.
I would think the best place to put it would be in “My OSMC”, like the remote setup. Users would only run it if they wanted to, and it would set the Kodi settings that fit what is discovered. It could also be run the first time Kodi starts, as part of the OOB experience.