There's already the selection deprioritizer mod, which prioritizes navy over land over air, and some other small tweaks when box selecting, but I wonder if it's possible to create a hotkey that lowers/increases selection priority for your selected units, albeit as a mod.
This would be great for when you want to park a flak, mobile shield, or whatever unit somewhere, but you accidently keep including it in box selection of other units and moving it away from where you want it to be