Would Starlord’s plan actually have worked if he didn’t hit Thanos?
If the plan you meant was to remove the gauntlet from Thanos. Then the answer is Yes, the plan would work if he didn’t punch Thanos in the face.
However, if the purpose was to stop Thanos from killing half of the lives of the universe, it really depends on who would wear the gauntlet once it has come off Thanos hand.
As shown in the comic, if the gauntlet falls to the wrong hand, things could have gotten worse. when Squirrel Girl got the gauntlet, Thanos had to collaborate with other heroes to get back the gauntlet, which is funny.
We do not know what was their next step after snatching the gauntlet from Thanos. Nor do we know who would or could wield the power of the infinity stones.
if they got the gauntlet but turned out nobody could use it, Thanos could have overpowered them and got back the gauntlet. Yes, he’s that powerful. He could kill everyone with brute force if he wanted to, but it was too time consuming. That’s why he needed the infinity stones.