There is currently a problem when playing movies in online PsychoPy experiments, whereby each movie is played only the first time it is presented, appearing as a static image for subsequent presentations. I suspect that the random trial that your movies stop playing at is related to the trial in which the second movie repetition is played.
It is possible to duplicate the movies under different names for subsequent repetitions, but that multiplies the resources that the participant need to download each time they run the experiment, which is undesirable. Alternatively, one could enforce only one presentation within each experimental block, which is also not ideal.
My workaround to the problem is to add a code component below the movie. The example below assumes that your movie component is called myMovie, so simply replace its name with the name of yours. For example, the code components could have a Begin Routine tab value of myMovie.play(), and an End Routine tab value of myMovie.stop() with myMovie.seek(0) on the line below that. The .stop() is optional if the end of the movie also ends the trial, or the movie does not either have or play an audio track. This solution ensures that the movie resumes at its beginning on its next presentation. But has the limitation of starting at the beginning of a trial. Although it is easy to offset the start by adding a routine before, but within the trial loop, that last for the desired delay.