Every qualified person I've heard talk about this said the opposite. "Top-20 school" isn't how professors or large industry labs evaluate a PhD, they will look at the advisor's reputation and the specific lab.
> A masters would end up taking your career to a higher place in the same time you spend on a mediocre phd.
1. This is definitely wrong for someone aiming for research jobs. If we're talking about accumulating money irrespective of the job, then sure, a master is probably better. 2. A "mediocre" PhD is obviously a bad thing career-wise, but if your definition of "mediocre" is "from a non-top-20 school", that definition is absurd.
Maybe your comments stem from going "through one of the worst labs you can find in operation today". Or maybe it's US-specific, I don't know.