The trap is not the salary job promotion, but the raise of middle class lifestyle. You wont leave middle class, as long as you raise your lifestyle with every income increase, and stay in dept.
The solution is to keep a frugal lifestyle. e.g. my lifestyle is around Euro1000/month, even including my sailing boat. A typical good payed coders job leaves Euro2000 surplus every month. So working for salary for one year means, that I have two year runway to work for myself.