There are several approaches to this kind of question.
For the diagram you show, with only a few molecules with known positions and velocities, you’re working in the realm of Newtonian mechanics, not statistical mechanics or thermodynamics. In that realm, everything is determined and known, entropy is therefore always zero, and it’s not meaningful to talk about the 2nd law of thermodynamics: it’s true by definition.
With a slightly more disordered/complex system, you enter statistical mechanics. Here, you talk about probabilities of things happening, including the probability of changes in entropy. In that limit entropy can go down, it’s just unlikely. As the system gets bigger, it gets more unlikely.
As you eventually get to the large system limit, the probability of deviations is effectively zero, and the laws of thermodynamics are rigidly applicable.