The rapid emergence and expansion of novel SARS-CoV-2 variants threatens our ability to achieve herd immunity for COVID-19. These novel SARS-CoV-2 variants often harbor multiple point mutations, conferring one or more evolutionarily advantageous traits, such as increased transmissibility, immune evasion and longer infection duration. In a number of cases, variant emergence has been linked to long-term infections in individuals who were either immunocompromised or treated with convalescent plasma. In this paper, we used a stochastic evolutionary modeling framework to explore the emergence of fitter variants of SARS-CoV-2 during long-term infections. We found that increased viral load and infection duration favor emergence of such variants. While the overall probability of emergence and subsequent transmission from any given infection is low, on a population level these events occur fairly frequently. Targeting these low-probability stochastic events that lead to the establishment of novel advantageous viral variants might allow us to slow the rate at which they emerge in the patient population, and prevent them from spreading deterministically due to natural selection. Our work thus suggests practical ways to achieve control of long-term SARS-CoV-2 infections, which will be critical for slowing the rate of viral evolution.