> can't find any "AltGr dead keys" variant on the OSX I'm using at the moment
I don't use OSX, sorry. Maybe try https://github.com/xv0x7c0/osx-us-altgr-intl
> I don't have any keyboard with a key marked "AltGr" either btw :).
That's the right alt (not to be confused with the alt right).
> the canadian english variant I'm using definitely has a ~ key
Can you type "ã" or "õ"?
I'm not saying it's the optimal solution, in fact my custom layout works slightly better for myself. However, learning how to build that custom layout in both Linux and Windows took me time that would have been better spent elsewhere.
All I'm saying is that people in the same situation I was in (programmer writing daily in multiple Western European languages), this obscure-niche-that-nobody-seems-to-know-about layout will serve you fine 100% of the times, whatever the language, without you spending ungodly hours coming up with your own.