... and there is repulsion. All the electrons push each other away.

This is like the push you feel when you put the same poles of a magnet close together.

This all acts like a shield between the electron and the nucleus.