However, the Maxwell equations did not seem to obey the principle of relativity. ...The physics is excellent but the history is incomplete. Yes, Einstein follows Lorentz and Poincare, as his famous 1905 paper alludes to their work without mentioning them:
When the failure of the equations of physics in the above case came to light, the first thought that occurred was that the trouble must lie in the new Maxwell equations of electrodynamics, which were only 20 years old at the time. It seemed almost obvious that these equations must be wrong, so the thing to do was to change them in such a way that under the Galilean transformation the principle of relativity would be satisfied. When this was tried, the new terms that had to be put into the equations led to predictions of new electrical phenomena that did not exist at all when tested experimentally, so this attempt had to be abandoned. Then it gradually became apparent that Maxwell’s laws of electrodynamics were correct, and the trouble must be sought elsewhere.
In the meantime, H. A. Lorentz noticed a remarkable and curious thing when he made the following substitutions in the Maxwell equations:... Einstein, following a suggestion originally made by Poincaré, then proposed that all the physical laws should be of such a kind that they remain unchanged under a Lorentz transformation. In other words, we should change, not the laws of electrodynamics, but the laws of mechanics. ...
As mentioned above, attempts were made to determine the absolute velocity of the earth through the hypothetical “ether” that was supposed to pervade all space. The most famous of these experiments is one performed by Michelson and Morley in 1887. It was 18 years later before the negative results of the experiment were finally explained, by Einstein. ...
It was ultimately recognized, as Poincaré pointed out, that a complete conspiracy is itself a law of nature! Poincaré then proposed that there is such a law of nature, that it is not possible to discover an ether wind by any experiment; that is, there is no way to determine an absolute velocity.
Examples of this sort, together with the unsuccessful attempts to discover any motion of the earth relatively to the “light medium,” suggest that the phenomena of electrodynamics as well as of mechanics possess no properties corresponding to the idea of absolute rest. They suggest rather that, as has already been shown to the first order of small quantities, the same laws of electrodynamics and optics will be valid for all frames of reference for which the equations of mechanics hold good.1 We will raise this conjecture (the purport of which will hereafter be called the “Principle of Relativity”) to the status of a postulate, and also introduce another postulate,The paper does not explain or even mention the Michelson-Morley experiment, and historians now
agree that it played no part in Einstein's reasoning. Einstein's contribution was to postulate what Lorentz and Poincare had deduced from Maxwell and Michelson-Morley.