The best pain medicine is..... the one that works for you!
Regarding GERD ... be careful that the medicines you're taking aren't just for the symptoms, and aren't fixing the problem. Most rebound is caused by not having enough stomach acid.... Taking most remedies remove all acid, complicating the problem. You can see if all you need is more stomach acid by taking a tablespoon of apply cider vinegar during your next bout. If it solves the problem (very quickly, a few minutes at longest) then you don't need fancy medications (which perpetuate the issue) but more of the basic stomach enzymes.
If you have serious GERD, then some of the medications can heal it. At that point, go off the med and try the enzymes to solve the problem, otherwise, it will return. The consequences of having that burn your esophagus is terrible. Don't put off a remedy.