I only applied to (very) few top schools for PhD; in worst case will do MS first (at my alma mater).
If you do great research, then it should help. But keep in mind the standards are higher for MS applicants - if they don't finish PhD, the university can't even award a Masters since they already have one.
I have been looking into MS at top 10-20 schools (in CS), and had a hard time finding a funded research MS.
(now Stanford seems to offer one, and yes I think it's slightly easier to get in). However, many schools specifically say they strongly prefer PhD applicants.
Also, below the top 4-5, I saw either
(1) non-funded MS
(2) plenty of coursework (like 7-9 courses) and a tiny thesis, which doesn't help that much with getting into PhD.
You may do your own research on the topic, this is just what I found.