How to make an object appear and disappear repeatedly in a certain area?
You could use a particle system, defining the boundary by the shape of the emitter.

To  make 1 particle appear and disappear in random places, set the lifetime of the particle to be the desired frame length of its appearance, and set the total number of particles to divide the total duration of emission by that amount.

Switch off physics, velocities, etc, set the Emit From to 'Volume', and make a sphere to be the target 'Object' of the render settings.

Sample settings:



Sample Result:



You could animate the object color, for example, to have each electron fade in and out, or produce other effects.