A few things....
For one, Adam Warlock stands outside of space and time; meaning, his actions are not necessarily linear, for one, but more importantly, this means that psychics or even those in possession of the Mind and Time gems cannot predict his movements. So no cosmic being can know what Adam Warlock is going to do ahead of time, making him 100% unpredictable.
Secondly, Adam Warlock (and Gamora) have a keen familiarity with the Soul Gem. My guess is that Gamora will take this role in Avengers 4 rather than Warlock. But, Warlock can use his knowledge with the Soul Gem to manipulate the other gems (as well as hide from the person that wields them) if they are in contact via the Gauntlet.
Third, since he's aware of how the Soul Gem works, if Warlock dies, he can be reborn as someone else (by transmitting himself from the Soul Realm into a recently deceased body). So he's not easy to get rid of...
Even with all of this, Adam Warlock can't walk up to Thanos and just punch him in the mouth. He needs (needed) literally every possible distraction imaginable just to get Thanos to marginally drop his guard, and even then it really didn't defeat Thanos.
In the end, Warlock really just created enough of a fight, a long-enough, protracted enough fight where Thanos' own self-doubt caused him to defeat himself. See, Thanos doesn't actually, truly, believe that he is worthy of being a god. He doesn't believe he, or anyone, should have that kind of power over life and the universe; even though that's his long-stated ambition. So subconsciously, Thanos may subvert his own plans.
Warlock was the one guy in the Universe who not only knew that, but knew how to cause Thanos to lose because of it.