Stop autoplay if next episode is missing

I’ve been hit by this a few times, but it seems that autoplay continues to the next available episode even if that’s not the next episode in the series.

Is there anyway that autoplay could stop and state an episode is missing?