There are plenty of middling engineers at FAANG-class companies. It is true that they have more rigorous standards and employ above average engineers, but that isn't the primary driver of the comp: these companies have to pay a premium to attract engineers in part because working at a huge (and in many cases unpopular) company isn't fun.
Source: Worked at Microsoft for about a decade.