I’ve been a software engineer for many years, I stick at it because I enjoy it. Paying well is secondary. It requires a lot of focus, but the enjoyment of solving problems and being creative, is what drives me, not financial. That’s why I still do it. If you can find that enjoyment, don’t worry about not catching up, it will come.
I read the number of developer jobs doubles every 5 years. So with 5 years experience you’d be in the top 50%