Well,
Wasp can shrink other objects and enlarge them as shown in the Ant-Man and Wasp trailer, so she shrinks the Hulk down and he goes inside Thanos's head with some kind of device he can enlarge with, Thanos has a hell of a headache. Hulk can survive in space and underwater so he doesn't need a breathing device, he could live through shrinking.
But of course there will be a solution that's more narratively interesting than a simple "within universe" logical solution.
That does bring me back to Infinity War, I was expecting to see Banner turn into the Hulk while inside the Hulkbuster, it would've been really cool to see the Hulk burst out of the armor, but nope, it didn't happen.
I hope in IW2 Hulk doesn't finally show up to beat down Thanos and defeat him, I liked that as powerful as the Hulk is, he could never beat Thanos with just his brute strength. The Avengers will need to do something clever to defeat him.