Maybe in a small company, where your efforts can have a direct, meaningful impact on the company's net worth. For a company as large as Amazon, though... there's so much going on, and so much of it completely unrelated to your personal work, that I feel like it'd be kind of meaningless unless you were in a really high-level management position.
I'll have to disagree with your exception as well. Data has shown that CEOs at giant corps have no impact on how things go down. It comes back to your statement of how much is going on. If all the goings on in the corp mesh perfectly with the goings on outside, success happens. A single human CEO can neither be credited for success nor blamed for failure in these cases.
I agree with your premise, but don't give too much credit to "the high level management". Most of them are groping in the dark.
If you're an executive pulling in over $500k, sure stock should absolutely be compensation and motivation. If you're rank and file and need $120k/yr to even afford to live, have kids, save for retirement, etc. in the area, then no stock should absolutely not be the primary means of compensation.
The best argument I've heard on this front is about diversifying risk. If your company tanks and you're rank and file, you're getting laid off and your stock holdings are tanking. Best to not be doubly exposed to the company's risk profile.
I don't see why it would be more motivating than just getting the current cash value of the stock, in a situation like Amazon's where you _maybe do, maybe don't_ really influence the stock price. Are you saying you write such influential code that you think you will manage to tip things in your favor on such a grand scale?