Computer science has a higher loading for intelligence than the engineering majors, so the correlation between intelligence and salary is greater. School selectivity is a measure of intelligence.
For much of the work engineers do, the difference between a smart engineer and a dumb engineer is not that much. Think designing a bridge, that has all be done before and there are general procedures for it.
Programming is different, to a good degree: the difference between the work a smart programmer does and the work a bad programmer is very significant and very noticeable. See "10X programmers"  *. Individual differences in programming effectiveness are much larger than in other disciplines.
This is not to say that cs majors are more intelligent, their SAT scores are actually somewhat lower than the other engineering majors. They just matter for them more.
* it is currently trendy to declare that "10X programmers" are a myth that hurt women and minorities, I ignore those people mostly