I think most people map their keyboards to something based upon US QWERTY and set their input language in the OS to their language layout. that means no faffing around with unicode. e.g. QMK's KC_SEMI
is ;
in English (United States) locale but å
in a nordic layout. There's not really a fully portable way to achieve it all on-keyboard because the means to input unicode differs between operating systems. However, you can use QMK's unicode support but you will also need to include some keys that toggle between which OS you're plugged into to have it work.
For portability you are better off using whatever the most widely-used means of typing your given characters are across OSs, so if Linux/Mac/Windows all have the same deadkey combination for ë and ê on their built-in AZERTY, use a macro that types that. As for æ and œ then yeah, you might be shit out of luck with a properly agnostic portable system. Unicode stuff, as I said above, is not OS agnostic so you will have to toggle a setting based on which OS you are using at the time. I don't think there's a way to detect that from the host unless there is a hueristic I'm unaware of.
Good luck, I hope you come up with a low-friction solution.