I wouldn't say the Rock was groomed for the title. It's pretty clear that he started with a strong push for the IC belt but that's a far shot away from the heavyweight title. And I think just about everyone could agree that the nature of his push back fired.
The fans had turned on the guy pretty hard, they had no choice but to make him heel and I don't think the WWF at the time had any way of knowing that he would massively get over in the heel role. He became the heavyweight champ because he was over and because he needed to look credible for Austin at Wrestlemania. This isn't a case of him being like Roman Reigns, the guy was getting gigantic pops regularly and deserved it. Not to mention the WWF was beating WCW at this time so it was clearly warranted.
Considering he lost to Austin at Wrestlemania (and rightfully so at the time) and then lost to HHH at the following Wrestlemania (despite the Rock being the face and HHH obviously not being in his league), and then losing to Austin at the following Wrestlemania, I wouldn't say the guy was pushed too the moon. The Rock finally picked up a main event win at the following Wrestlemania against Hogan, a guy that's known to politic just to get out of doing jobs, clearly even Hogan had to agree the Rock was deserving of this type of rub.
Long story short the Rock got a main event push after getting over, I wouldn't really say he got pushed to the moon however.
He was definitely groomed for the top spot, many of the company guys at the time confirmed this (Patterson, Cornette, etc.) They had every intention to make Rocky the next Hogan, capitalizing on his heritage and youth. Of course it didn't go down that way, but they gave him so much momentum at the beginning to make it happen. The IC belt was still very important in the company and was the 2nd prestigious title below the world title so it's certainly a big rub especially for a rookie.
He was always given all the opportunities needed to break out, and once he got himself over in the Nation, the push began. It was clear once he was in the final 4 in the 98 Rumble, they had big plans for him in the future main event scene. Not to mention having matches with Austin on TV and house shows after the fact. It was a different push than Austin, but still a big push nonetheless. When you're given opportunities to cut promos, have longer matches and work big angles with all the top guys culminating in a headline at WM15, you can't say that Rock wasn't given a push. The more top guys they had meant the more momentum they could generate against WCW, so Rock was gonna get his time either way. He was even slated to win at WM16 (against Austin no less) before the surgery and HHH convinced them otherwise, so it's not like it was out of the question for him to get his big moment.
Viewers stayed post Wrestlemania for a bit just to see the fallout of Wrestlemania and the fallout of WWE purchasing WCW. They quickly left after that. Ratings were weak until July, with the announcement that the Rock was going to come back and join either the Alliance or the WWF. They were in the 4s for all of May and June, and were back in the 5s in July and August with the Rocks comeback, they even got a 5.7 for the episode he returned. And he wasn't even the focus of the show, he was put in the underneath spot messing with Booker and Jericho over the WCW Title. When Austin won the WWF title in October of 2001, ratings actually dropped quite significantly, they were doing around the mid to high 4s in September and October, and the ratings after he won the belt dropped to the high 3s-early 4s until the wrapping up of the Invasion story line at SS. As far as the Invasion PPV doing well goes, it did well because it was WWF vs WCW, if Austin wasn't there it still would have done well. Naturally, it would have done way better if they had all the huge stars, but the brand power of both companies was enough to carry it to 1 huge PPV, even if the Alliance team was an utter embarrassment.
They dropped in May and June because they ran Austin/HHH vs. Taker/Kane into the ground and weren't feuding with any of the other tag teams until the short-lived program with Benoit and Jericho. Their return to a 5.0+ rating was actually the show when Austin turned back babyface during the leadup to Invasion, which was definitely a factor in making the Invasion PPV a success because it immediately spiked the ratings and saw an increase in ticket sales. It's ridiculous to think that it would have done nearly as well if you replaced Austin with a random midcarder, especially since the promotion leading up to it was Austin leading Team WWF against the Alliance. You've already admitted that the Alliance team was lackluster, so shouldn't credit be given to the top guy on the other side? You can't count any hypothetical returns as an argument for why Invasion drew so well because it wasn't a guarantee. Also, Rock returning didn't stop the ratings decline one bit after that 5.7 so it points to the shoddy booking and storylines as the main reason for the decline (along with the Alliance looking like the jobber hour by every passing week)
Austin was the most over guy with the WWE fanbase in 1997, but it wasn't by much and he wasn't that much more over than guys like Taker, Michaels, and Bret and he had no huge effect on business until Tyson and then McMahon. Bret got the ball rolling for him, Tyson put him on the map, and McMahon took him to another level. I agree that the mishandling of Austins character and heel turns hurt him, but Rock didn't get favorable booking much either and he still stayed white hot. But while his failed turns hurt him, he clearly couldn't stay as over in the upper midcard feuding with and showing vulnerability to guys like Booker, Bossman, Hall, Guerrero if he hadn't have left, etc. Rock was capable of having undercard feuds and dropping matches/looking "weak" at times and keeping his popularity and momentum. Rock got geeked out a bunch in 1998, especially to Shamrock, he got his opportunity because he was so good and got over despite of questionable at times booking.
I'm not saying Austin wasn't a huge star or that he wasn't great, I'm just saying Rock was bigger and quite frankly better. Austin had a really strong year and a half run, but his run was weaker than Rocks run, and the only big business he did post 1999 was his initial return and his feud with a bigger star at the time in Rock.
I disagree, Austin was by far the most over guy in the summer of 97 and only Undertaker came close. This was when he wasn't even wrestling on TV due to the piledriver. He was also getting over as a face organically through the year, contrary to people's statements that he only got big after Tyson and Vince. His merchandise sales were literally the only reason WWF made a profit that year, they skyrocketed after WM13. So yeah, he was definitely their biggest moneymaker at that time.
I also don't think his 2002 run was due to his limitations as a character, since he was still very popular in the early part of the year. It was because they tried the same Austin/Vince angle with Flair and it just fell flat because fans had seen it twice before. Perhaps you have a point with Austin's character not being suited to "looking weak" but it's a minor flaw considering the badass anti-hero gimmick was basically popularized by Austin to begin with. I agree that Rock was more versatile in his roles though, he could take more losses without it negatively affecting his momentum. If your only benchmark is how many losses the guy can take and still stay over, then Rock is better for sure but they were both different characters and booked differently to begin with so it's apples and oranges. We saw what happened when Rock was booked to be Hogan 2.0 and it got him booed out of the building, so they wanted to take a different approach with him.