Some people think that because both Kid and his crew as well as Law and his crew were defeated, then the same thing will happen to Luffy and his crew at Egghead.
But it won't happen and here are the reasons why.
Remember that Law and Kid were not defeated before the timeskip, and they didn't do any training before they went to the New World. Other Kid and Killer being defeated and captured by Kaido, Kid, Killer, and Law so far got it pretty easy in the New World and even before they entered the New World they got it easy.
Neither of them and their crew suffered a major defeat until now with Shanks and Blackbeard.
However Luffy and his crew already suffered a major defeat back during the Sabaody Archipelago Arc.
Luffy suffered a major loss again during the end of the Marineford arc when Ace died.
Luffy and his crew being separated and defeated and seeing Ace be killed during Marineford, that was a major defeat for Luffy and also a reality check for him.
After everything that happened, the Straw Hats decided to train for 2 years before they reunited and entered the New World.
And if you think that wasn't enough then we have Luffy being defeated by Kaido at Wano Country.
After that defeat, Luffy went through a mini training during Act 2 of Wano.
Luffy already suffered a major defeat twice before the timeskip and then suffered another major defeat again after the timeskip, went through 2 years of training and then had another mini training during during the Wano arc.
We don't need to see Luffy getting another major defeat again or see him going through another training, and no we are not getting another timeskip.
I'm also on the belief that the reason why Oda had both Kid and Law get defeated is because he wanted to remove them from the race towards the One Piece, leaving only Luffy, Blackbeard, and Shanks as the final three pirates to go after the One Piece.
So overall Luffy and his crew will not get defeated at Egghead, the worst that could maybe happen to them is that they fail to save Vegapunk but other than that they should be fine.
But it won't happen and here are the reasons why.
Remember that Law and Kid were not defeated before the timeskip, and they didn't do any training before they went to the New World. Other Kid and Killer being defeated and captured by Kaido, Kid, Killer, and Law so far got it pretty easy in the New World and even before they entered the New World they got it easy.
Neither of them and their crew suffered a major defeat until now with Shanks and Blackbeard.
However Luffy and his crew already suffered a major defeat back during the Sabaody Archipelago Arc.

Luffy suffered a major loss again during the end of the Marineford arc when Ace died.

Luffy and his crew being separated and defeated and seeing Ace be killed during Marineford, that was a major defeat for Luffy and also a reality check for him.
After everything that happened, the Straw Hats decided to train for 2 years before they reunited and entered the New World.

And if you think that wasn't enough then we have Luffy being defeated by Kaido at Wano Country.

After that defeat, Luffy went through a mini training during Act 2 of Wano.

Luffy already suffered a major defeat twice before the timeskip and then suffered another major defeat again after the timeskip, went through 2 years of training and then had another mini training during during the Wano arc.
We don't need to see Luffy getting another major defeat again or see him going through another training, and no we are not getting another timeskip.
I'm also on the belief that the reason why Oda had both Kid and Law get defeated is because he wanted to remove them from the race towards the One Piece, leaving only Luffy, Blackbeard, and Shanks as the final three pirates to go after the One Piece.

So overall Luffy and his crew will not get defeated at Egghead, the worst that could maybe happen to them is that they fail to save Vegapunk but other than that they should be fine.