Einstein's physics teacher, H. F. Weber, apparently did not teach him any Helmholtz, as Einstein wrote in a 10 August 1899 letter to Mileva Marić:
I returned the Helmholtz volume* and am at present studying again in depth Hertz's propagation of electric force.** The reason for it was that [I] didn't understand Helmholtz's treatise on the principle of least action in electrodynamics. I am more and more convinced that the electrodynamics of moving bodies, as presented today, is not correct, and that it should be possible to present it in a simpler way. The introduction of the term "ether" into the theories of electricity led to the notion of a medium of whose motion one can speak without being able, I believe, to associate a physical meaning with this statement. I think that the electric forces can be directly defined only for empty space, [which is] also emphasized by Hertz…
—Volume 1: The Early Years, 1879-1902 (English translation supplement) Page 131
*Helmholtz's 1882 Wissenschaftliche Abhandlungen (not translated into English)
**Hertz's Electric waves being researches on the propagation of electric action with finite velocity through space
It's surprising Einstein was not formally taught the 19th century's leading way of doing E&M: deriving electric potentials from energetics first principles. This was taught in, e.g., Duhem's 1891-92 Leçons sur l'électricité et le magnétisme course.
Einstein's collected papers nowhere mention the derivation of Wilhelm Weber's law from Ampère's force law, which by the time Einstein was a physics student was at least ⅓ century old. Perhaps 19th century physics instruction lagged behind cutting-edge research developments, much as today the vast majority of what is taught in physics courses were cutting-edge developments at least a century ago. Perhaps this is why Einstein was frustrated and rarely attended class.