In a population model for an infectious disease, we consider the early stochastic dynamics of an emergent 'mutant' strain, appearing and spreading during an epidemic of another 'wildtype' strain. The mutant may not reach establishment in the host population. The time at which the mutant first appears determines its probability of establishment. We calculate this establishment probability with two methods. The first method assumes a classical branching process, with a constant transmission rate. The second method reflects the changing size of the pool of susceptible hosts, due to the dynamics of the wildtype. We find that susceptible depletion can substantially impact the establishment probability. We explore the consequences of this stochastic establishment on the "escape pressure" acting on a pathogen to produce immune escape variants. We find that the overall escape pressure rate depends strongly on the appearance time of the mutant, especially if the establishment probability is itself shaped by the continued spread of the wildtype. In most scenarios, the escape pressure rate (and thus, the risk of new escape variants) peaks slightly earlier than the prevalence of the wildtype strain. Integrating the escape pressure over time, we obtain the cumulative escape pressure generated by the wildtype epidemic. The relationship between the escape pressure and the vaccination coverage depends on the cross-immunity, due to susceptible depletion. For example, with intermediate cross-immunity, the risk of immune escape may be lowest at intermediate vaccination coverages. Thus, these results raise important considerations for vaccination strategies in response to novel outbreaks.