Yes, but we have reciprocal tax agreements with many countries. In Germany he’s already paying n dollars in taxes, and that n becomes a tax credit in the US.
This doesn't apply to all forms of income though. You can get double-taxed on some incomes.
That’s true, but it’s fairly easy to do research beforehand to avoid this. The people generally impacted by this can afford advice from a tax attorney.
is there some cunning (but permitted) trick to avoid paying tax on ESPP gain, and sale of RSUs?
I'm not talking about avoiding paying tax entirely - just paying only the rate of either the US or the other country, not both.