Yes, programming with a nordic keyboard is slightly inconvenient because ~, {, }, [, ], and | all require AltGr. (Isn't that the same for German keyboard?)
I had to switch over 25 years ago when moving. I just considered it a minor inconvenience. I don't think my programming output really suffers, there are so many other factors. Some (very few) people (native or foreigners) do use different keyboards for that reason. I have not noted that they would be better or faster programmers for that. I would claim the correlation between programming fast and introducing more bugs is much clearer.
As for the dead key, pressing tilde space is not the optimal solution. Especially if you are using ssh over ssh. That means you need to produce 2 tilde characters to control the inner ssh. I prefer pressing tilde tilde. With nested ssh that makes 4 tilde characters. Much easier to type than tilde space because you just hold the AltGr key during all for 4 key presses.
Anecdata, but after having some programs break when I used `~` to refer to my home directory (can't remember, was a long time ago), I got into the habit of either using `${HOME}` if I'm in a shell, or just writing the full path explicitly if it's a config file.
So nowadays I only use `~` when I'm navigating in an interactive shell session, and never in commands or config files.