Grammabear it is really a combination of everything -- including luck.
A great surgeon and the best surgical method (in my case a truly world class hip surgeon who specializes in Anterior Approach to Total Hip Replacement.)
The Anterior Approach was a BIG part of my rapid and virtually pain free recovery from hip replacement surgery.
Also note, hip replacement in general is already easier than replacing a knee (all things being equal) so we may not see such amazing results with my upcoming BTKR.
Exparel was another huge factor for me -- 72 hours of EFFECTIVE anesthetic in the joint is an AMAZING ADVANTAGE -- most of the worst pain happens in those first few days. Most people spend these 3 days in the hospital after joint replacement and that is in large part due to pain management where they can get IV meds and more powerful narcotics typically.
Condition and strength play an important role -- you level of fitness. This also includes doing "pre-hab" BEFORE surgery to prepare for it.
Age matters because typically those who are older don't heal as quickly.
Aftercare: Peter and I do NOT share the same level of trust in the physical therapists -- many people are actually injured or set back by incompetent and overly aggressive PTs.
Even though I PERSONALLY might push HARDER than my therapists demand, the key is doing as much as you can safely do without causing further inflammation, swelling or later pain (even the next day).
We don't want to waste recovery time but we don't want to push too hard either. So for me, a big part of the recovery is the knowledge and experience I have with both my own body and how much pain is "Ok" versus pain that is not good for me. Having been in extreme physical activity throughout my life, I know these parameters much better than most any PT could learn in a few sessions.
I used all the PTs for ideas, guidance, focus, and assistance, but I never "trusted" a single one of them to DECIDE what was right for me.
Mental preparation can be a very large factor as well, along with attitude. (I am a trained hypnotist and engage every trick available to both make the surgery more pleasant and my recovery easier.)
This is both the will to do the (proper) rehab and the attitude to just "get better" (as well as the ability to deal smoothly with any set backs.)
For me, actively deciding to ENJOY the process (and succeeding in doing so) was a great help to my attitude. I don't just enjoy my new hip, but enjoyed THE ENTIRE PROCESS, even the things you would think would not be pleasnt. I made something of a game out of HAVING FUN and if nothing else being both proud and delighted at my ability to deal with this.
This is actually a good use for some personal traits that aren't usually considered positive: arrogance, pride, selfishness (you have basically ONE JOB to do after such surgery: HEAL & REPAIR you body.)
Finally there is LUCK. You can do everything right (and so can your surgeon) but develop an infection or other problem despite that.
Luck probably won't every get you a great result by itself, but if everything else is optimized, luck can give you an experience like mine: 1/2 second of total pain for a Total Hip Replacement.
To me, even that 1/2 second was a GOOD THING -- it made clear all the pain I had avoided.
All of the above.