Yes, but in the time it takes to complete a PhD, the junior engineer can usually get promoted at least once. So you both end up in the same place, but the guy who went straight to industry was making 3x more than the PhD in the meantime.
Don't forget that a PhD makes it more difficult to get some kinds of jobs. An intermediate or low level developer job may pay more, but if you have a PhD the interviewers are going to question why you are applying for a low level job and be worried how long you will stay. So in some respects a PhD reduces your employability (though you can always lie and say you never got the PhD, though it is kind of hard to hide on a resume without leaving a time gap, which makes you seem even less employable.)