I know that moving companies is very powerful in terms of compensation and learning new things. However, I'm wondering if it's still effective in the context of trying to get to the highest engineering execution levels like director or VP?
Switching companies loses its effectiveness as you become more senior. At the director+ level, your job is almost entirely about influence. The timeline on which you have impact is often in the years, so it looks pretty bad if you're job hopping every 2-3 years. One litmus test for a director+ is "Do they have enough respect/influence that they could bring at least 3-4 staff+ level engineers with them from their previous company?" That's hard to do if you've been moving around frequently.
That's why you see so many people who are directors/VPs by staying in the same company for 10+ years (many examples of this at companies like Apple or Microsoft which build up internal talent well).
However, with that said, there are a few examples of very senior folks who still hop around frequently, eg. Michael Lopp and Li Fan.