Overpaid or not (I tend to agree that they are overpaid), if a significant portion of their compensation is stock grants, then that portion of their compensation is directly tied to the value of the company.
I'd argue that the value of the company often doesn't reflect whether they're doing a good job. Which is why you often find CEOs taking short-termist approach which buoys the value of the company in the short term and completely destroys it in the long term.
There's a famous study that concluded "CEO effects" only account for about 14.5% of performance [1]. It may be quite dated by today, though, it may be even less pronounced according to [2] that claims more recent studies show the CEO only explains for 4.5%-12.8% of performance.[2]
>that portion of their compensation is directly tied to the value of the company.
One small nuance: it can be disproportionately tied to the short term value of the company. One of the moral hazards of this compensation scheme is that it may incentivize an executive to make decisions that inflate the value of the company short term while also de-valuing it long term (when they are no longer part of the company -- presumably after they've extracted that value).