If I buy Toyota stock at $10/share and sell it years later for $100/share, I get the $90/share capital gain all to myself. It's not like half of it -- or even 1% of it -- gets skimmed off the top by some Japanese dude.
That stock price is a capitol gain it has nothing directly to do with profit or losses….
Company could have crap profits and you can make money on the sale or doing fabulous and have a low stock price.
As I said, unless the company pays dividends their profits or losses don’t go to stock holders. The board controls what the company does.. can decide to offshore everything and you can make money when you sell but that has nothing to do with keeping the profits to the stockholders or where they live.