New insights into Hertz's theory of electromagnetism