There are other ways to get loans for investment, so touching your 401K seems like a premature move if you haven’t explored other options.
Like many others on this thread, I too have taken loans against my 401K in the past when I had to, but it’s certainly only something to do if you can feel confident about meeting the payments, timeframes, etc. I think the decision is impacted more if you have significant investment in the 401K, as $30K vs. $300K for example would present different options and consequences.
There are several ways to get unsecured loans, and I have used several, such as Lending Club and Lightstream, both of which were great low interest options that allowed for quick investment capabilities with relatively little impact, and multiple pay back timeframe options. Credit score certainly helps here.
I agree with both sides, don’t touch it unless you understand what your potentially impacting long term, but also remember that you want your money working for you. What I can tell you is that you should be thinking about how to not be counting on any one source of income or investment for retirement, as there are no guarantees and you need to be creating multiple streams of income to give yourself a higher chance of success. Good luck to you!