As the title. Between when voltage is higher; before the electrons reach the component, and afterwards.
You're confusing (electrostatic) potential (aka voltage) with potential energy.
An electron has a high potential energy when it is at a location associated with a more negative value of potential, and a low potential energy when at a location associated with a more positive potential.
The reason is that electrical charge has two types: positive and negative which exert attractive forces on each other but repulsive forces on themselves. A more positive potential is produced by an accumulation of positive charge (which attracts negatively charged electrons) and a more negative potential is produced by an accumulation of negative charge (which repels electrons).
The choice of defining one type of charge as negative and the other as positive was made arbitrarily, before the electron (with negative charge) was identified as the primary current carrier in metallic conductors. By the time that was discovered it was too late to go back and re-define the charge polarities for the convenience of engineers. In any case, the "mixed-up" polarity definition should help you remember that electrons aren't the only charge carrier and when other carriers are present they might behave differently from electrons.
How do the electrons "know" to slow down even well before they actually encounter a resistor that may be on the other side of a component?
They actually don't. Know, that is.
There are tree parts of this answer. First, they might never encounter a resistor on the other side of a component. Considering that speed of electron in a copper is somewhere in micron/s range chances are your particular electron will never even reach that resistor before you turn your circuit off.
Second, what you describing as "conveyor belt" is actually a flow of energy, not the movement of electrons. And energy transfer is happening close to the speed of light, which is fast but not instantaneous. Consequently, any changes or disruptions in a circuit do not happen immediately, it just looks like that because of high speed of wave propagation.
And finally, if you put one and two together, the resistor placed in a circuit does not "slow down electrons on a conveyor". What it does is make energy transfer harder, so the total energy flow in the circuit is reduced.
The analogy with water in pipes while being useful is technically incorrect, because the speed of water flow depends on pipe diameter according to Bernoulli's principle. Furthermore, the amount of electrons in a conductor is enormous. If you really want to compare electricity to water you should use at least a river.
Now, the river does not have to flow fast to pass wast amounts of energy. Imagine the force of water pushing down on water wheel lowered into the river. The bigger the wheel, the more power is generated. With big enough wheel even slow river can produce huge force.
So, what happens if you somehow manage to block a river upstream? The speed of flow will be pretty much the same, but the level would drop, and so would the pressure on our hypothetical huge water wheel. That is how resistor in a circuit works. Also important to note, that there will be some delay between blocking upstream and reducing the power downstream, just like it happens with electricity, only on different time scale.