The role of the analogy between gravitation and electricity in the formulation and acceptance of Coulombs law.
Priestley was among the firsts to suggest an analogy between gravitation and electricity. According to Newtonian gravitation theory inside a hollow sphere there is no gravitational attraction. Experimentally we can see that inside an electrified conducting sphere there is no electrical attraction. It is possible, by analogy, to infer that electrical interactions follow an inverse square law. Being analogy a week form of reasoning, an independent proof was needed. Coulomb was to give one. The law,slowly and not without criticisms (see the Volta-Coulomb controversy), was accepted. But Coulombs device was rather difficult to use and somehow unreliable for precise measurements. For increasingly precise measurements physicists went back to the hollow sphere method : remarkable the ones of Maxwell (10-4), Plimpton and Laughton (1936 : 10-9).
If we ask ourselves (with Feynman) how to build hollow spheres with such a precision, the answer is clear : spherical precision does not matter. The null result for electrical " forces " inside a conducting body does not depend on the shape of the conductors. Thus, in the end, the analogy with gravitation is not correct. (The spherical shape is useful in case of deviation from the inverse square law).
Let us summarise some interesting results: the analogy suggested the law, but the law was accepted (and is still taught) following Coulombs experiments; measurements of greater precision were based on the analogy, the analogy actually does not work.
See Feynman : Lectures in Physics, vol. 2,