Why do you say this? I have not read that before. Hill had acquitted himself quite well to that point except for not being able to get along with his superiors. He fought hardest in the 7 days and was the hero who saved the day at Antietam. Ewell was a good fighter with a good rep but had been pretty much out of commission since losing his leg at 2 Manasses and was, as such, a bit of an unknown quantity. Because Ewell was senior to Hill, had recovered from his Second Bull Run wound, and was ready for another command.
"Because Ewell was senior to Hill"
I don't know that would have been a deciding factor. The first thing Lee did after the 7 days was to reorganize his army, primarily by advancing less senior officers based on their performance in the field. He would have gone with whoever he thought best able to do the job, regardless of seniority.