Ant-Man could have gone inside Thanos and immediately killed him by cardiac arrest.
Why didn’t the Avengers consider this plan in Avengers: Endgame? The plan looks incredible simple instead of all this drama.
Ant-Man never needed to fight Thanos and in fact he was more useful to get the mini quantum tunnel in the van working again per their plan. He wasn't involved in the majority of the fight really and certainly not with any means of fighting Thanos.
It likely wouldn't have worked. Dr. Strange had foreseen over 14 million possible outcomes of the battle and the only one that ended with an Avengers victory was the one we saw. Granted, Strange wasn't giving out any hints as to what the winning strategy was or wasn't until the very last moment but I think it's safe to say that if Ant-Man had attempted anything that wasn't part of the winning strategy, Strange would have stepped in to stop him.