In Ash's current team, the strongest, not counting Pikachu, is Lucario or Dragonite.
Sirfetch is not as experienced as they are. Dragonite has beaten mega evolution.
Lucario is Ash's leading pokemon in this anime. Sirfetch is strong but I don't think he is the strongest
In fact, we cannot give an exact guess how strong which pokemon Ash is. Because we rarely watch the battle, Ash.
Beating a Mega Evolution doesn't really mean much. Ash's Hawlucha defeated Astrid's Mega Absol and Astrid must've very likely battled and beaten Korrina as she was a contestant in the Kalos League.
Even if Korrina trained post League, she battled Ash when they were still in the Normal Class. Defeating Rinto brought up Ash's Rank to 184 while Korrina was in the 1000's. So you argue Rinto's Gallade must've been significantly stronger than Korrina's Mega Lucario, also considering the fact that Bea absolutely wrecked her.
From a plot perspective so far, Lucario and Sirfetch'd are very likely Ash's strongest Pokemon (Not counting inconsistent Pikachu). Then again, we don't truly know who Ash's ace is in this region. It initially seemed like they were setting up Lucario to be Ash's ace but ever since it allowed, it has taken a backsea and hasn't necessary been utilised
.
I've said it before and will say it again, Ash will win against Iris but lose against Gary. Ash has barely won all the battles he had against Gary. The only one we can count was the Johto League and even then Gary's Electrivire completely destroyed Pikachu in the final Hoenn episodes. Gary will be Ash's roadblock to the Master Class.
There's also another potential plot in the episode revolving around who is Ash closest friend with Goh. Because Gary used to clearly be Ash's rival but also his childhood friend.
To be honest, this would be really underwhelming. Gary is a talented trainer no doubt and I never really considered Ash to be better than Gary despite Ash beating him in the Johto league as the battle could've honestly gone either way and Ash was the underdog during majority of the battle. And like you said, a Retired Gary effortlessly beat a post battle frontier Ash with ease. That said, making Gary the roadblock to the Master Class would be really underwhelming especially considering the fact that we have so many other powerful trainers who could be utilised. It would make more sense to include Elite four Members, such as Flint (Considering the Diamond and Pearl Remakes) etc, who would be more deserving of this spot.
If they really want to Make Gary Ash's Roadblock to the Master Class, they need to spend more time establishing Gary's level of strength. Maybe have Gary take part in a PWC tournament and defeat an Elite four Member or 2. Something like what Alain did during the Mega Evolution series.