Yes, mathematically, on average investing in equities in your 401(k) will put you ahead, but unless you can get a full match on the 19% (which is very rare), then the gain isn't life-changing (maybe an extra $5-10k depending on the amount and limit of the match). Plus, if you're young, you still have plenty of time to make up for the lost match, and with no student loan burden, you can invest even more in the future!
The main differentiator is risk. You and I both admit that on average equities return more, but the range is massive. in any given year, equities can return anywhere from -30% in crashes to +40% (which is usually a recovery from a crash). We've seen relatively stable growth for the last several years, which might continue, or might not. If you are comfortable with that type of risk and aren't adding any more debt, then you will probably be OK letting the loans drag out a little bit.
I'm usually in the minority on these questions, but I've experienced firsthand the liberation of getting rid of debt (especially student loan debt) even before 401(k) matches. Yes, that match is hard to leave on the table, but having that debt gone opens up many more options for investment. Plus you're only losing the match for one year. I'll take that versus dragging out student loans for several years.
All that to say that there's no bad answer here. Either option sets you up for financial security in the future, so do whichever gives you more satisfaction/peace/stability now.