Gravity and electromagnetic forces are somewhat similar, they both have infinite range, decay as 1/r, one key difference is that the electromagnetic force is 10^36 stronger than gravity [0]. Just for that reason I'm always immediately skeptical of projects of this type.
On Earth, gravity has a bonus of a free massive side plate. As a battery, it might work better on Jupiter and unusable in free space, but it still stores orders of magnitude more energy than we use, in abundant cheap materials. I liked the trains-on-hills project - seems easy enough to build in large quantities and stores reasonable amounts of energy.
With electromagnetic, we are barely capable of scraping a bit of energy from the surface without the device self-destructing. Even in superconductors, only a fraction of electrons whizzes around and even high-energy plasma is a mixture of both charges.
it is strong enough at the scale of a star, on earth my foot electromagnetic repulsion against the floor is enough to counteract all of the planet pull
[0] https://en.wikipedia.org/wiki/Fundamental_interaction