Electric force it is a force much more intense than the gravitational force. We are not talking about twice as strong. Not even ten times stronger. The electric force is nothing less than stronger than gravity by a factor of 10,000 trillion trillion trillion.
Or put another way: the electric force between an electron that orbits around a proton in a hydrogen atom is about 10 times more intense than the gravitational force between them.
Or to put it another way: the gravitational force, which is cumulative, cannot be imposed on the electric repulsion between the atoms until a minimum agglutination of 10,000 billion trillions of billions of them is formed. That is, something as big as a planet, as he explains Marcus chown in his book The universe in your pocket:
That equates to a body of about 600 kilometers in diameter if it is rocky, and about 400 if it is made of ice, which is less rigid than rock and is more easily crushed by gravity. From that threshold, gravity is intense enough to overcome the electrical force and attract all the components of a body towards the center of it, thus creating a sphere.
Or put another way, the last one: the reason that many astronomical bodies are shaped like potatoes is that they don't exceed that size threshold, something that does not happen with the Earth, which is spherical.
Why, if the protons of an atomic nucleus and the electrons that orbital around the nucleus attract each other with such extraordinary force, do not the atoms shrink to zero?
The answer is that these elementary constituent components of matter have a peculiar undulating nature, and waves are essentially extended elements. And they are because the electron wave needs to press too hard against a nucleus. Without that quantum effect, atoms would not exist.
Once a certain threshold of mass and size is exceeded, the object's resistance is unable to contain the gravitational force and acquires a spherical shape. In the solar system we observe that the major bodies about 1000 km in diameter, have spherical shapes.