The requirement for wudu'
Allah the almigthy says:
O you who have believed, when you rise to [perform] prayer, wash your faces and your forearms to the elbows and wipe over your heads and wash your feet to the ankles. ... (5:6)
Therefore the requirement is to wipe over the head not over the hair and how one would perform it is not prescribed, so you are basically free. Furthermore scholars came to different conclusions on this topic. It is certainly better to follow the sunnah of the prophet ()
More general when it comes to wudu':
The way in which parts of the body are washed or wiped over in wudoo’ is not obligatory. What is obligatory is to wash the parts that are to washed, and to wipe the parts that are to be wiped, in any manner that that is done. But undoubtedly following the way which is narrated from the Prophet (peace and blessings of Allaah be upon him) is better and more perfect.
(Source: islamqa fatwa #45867)
First let us check your claim:
Did the prophet actually have long hair?
We find in the sunnah the following descriptions:
Al-Bara' reported that Allah's Messenger (ﷺ) was of medium height, having broad shoulders, with his hair hanging down on the lobes of his ears. He put on a red mantle over him, and never have I seen anyone more handsome than Allah's Apostle (ﷺ).
(Sahih Muslim and Sahih al-Bukhari)
Never did I see anyone more handsome than Allah's Apostle (ﷺ) in the red mantle. His hair had been hanging down on the shoulders and his shoulders were very broad, and he was neither very tall nor short-statured. Ibn Kuraib said he had hair.
Anas reported that the hair of Allah's Messenger (may peace be upon him) came upon his shoulders. (Sahih Muslim and Sahih al-Bukhari)
The hair of the Messenger of Allah (ﷺ) were above wafrah and below jummah (his earlobes and his shoulders).
(Suanan abi Dawod)
The Prophet (ﷺ) came to Mecca and he had four plaits of hair.
(Sunan abi Dawod)
scholars came to the conclusion that his () hair usually never was longer than that it would reach his shoulders except in specific conditions where he () was not able to cut it like in case of a journey etc.. For more details see islamqa fatwa# 240084
The sunnah and recommendation of the prophet ()
Here are the significant parts of most of the reports concerning this topic:
First description which is suitable for men or more exactly men with short hairs:
... then passed his wet hands over his head from its front to its back and vice versa (beginning from the front and taking them to the back of his head up to the nape of the neck ...
(Sahih al-Bukhari and Sahih Muslim)
... When he reached the stage of wiping his head, he took a handful of water and poured it with his left hand over the middle of his head so much so that drops of water came down or almost came down. Then he wiped (his head) from its front to its back and from its back to its front. (Sunan abi Dawod)
... When he reached the stage of wiping his head, he placed his palms on the front of the head. Then he moved them until he reached the nape. He then returned them to the place from where he had started. (Sunan abi Dawod)
The second description which is more suitable for women and men with long hair and fears that his hair would get messed up:
He wiped the whole of his head from its upper to the lower part moving every side. He did not move the hair from their original position. (Sunan abi Dawod)
In this case one would start at the forehead and move along the hair until the end if one is intending to wipe the whole head.
For further details see also the fatwa islamqa # 45687 linked above.