In this paper we propose a novel SEIR stochastic epidemic model. A distinguishing feature of this new model is that it allows us to consider a set up under general latency and infectious period distributions. To some extent, queuing systems with infinitely many servers and a Markov chain with time-varying transition rate are the very technical underpinning of the paper. Although more general, the Markov chain is as tractable as previous models for exponentially distributed latency and infection periods. It is also significantly simpler and more tractable than semi-Markov models with a similar level of generality. Based on the notion of stochastic stability, we derive a sufficient condition for a shrinking epidemic in terms of the queuing systems occupation rate that drives the dynamics. Relying on this condition, we propose a class of ad-hoc stabilising mitigation strategies that seek to keep a balanced occupation rate after a prescribed mitigation-free period. We validate the approach in the light of recent data on the COVID-19 epidemic and assess the effect of different stabilising strategies. The results suggest that it is possible to curb the epidemic with various occupation rate levels, as long as the mitigation is not excessively procrastinated.