Question special

Some have advocated for a "PSLF side fund", where a resident chooses the repayment plan with the lowest monthly payment, then makes monthly contributions to a mutual fund, hoping that after 10 years, the average return will equal or exceed the interest on loans. At that time, if the resident is not eligible for PSLF, she can pay off loans with that account; if the resident is eligible, he then has a large account that can be used for retirement, down payment on a home, college fund, etc. Is this strategy advisable? What are the potential downsides?