The only way off the hamster wheel of paycheck to paycheck living is to find a way to make the paycheck larger. The entire system is designed prevent you from doing so of course. You can not save money out of poverty wages.
It's counter-intuitive but financially going $10K into credit card debt just to survive, while paying $10K for targeted education/training from disbursed 401K funds is a better use of the money. You can increase your pay by $20-30k or more per year with marketable training/education. If you pay off the credit card it will just come back if you don't increase your wages. Bankruptcy also can't take away the education/skills you've gained.
Swapping jobs frequently for a higher paycheck is required today. Every 1-2 years in your 20's as you fight the experience/poverty wages bullshit. Every 3-5 after that just to beat inflation. When you swap jobs the 401k becomes available for withdrawal. Instead of using it to pay down debts etc., pay for education/training to make the next job pay more. Usually signing up for the minimum amount of the 401K makes almost no difference to your take home pay but a nice little bit of cash at each job change.