As someone who reached well over 30 stone myself just over 18 months ago, I can only sympathise with him. It's such a struggle for some people and obviously he's at the end of his tether with having the surgery, I really hope it works out for him.
Thankfully the gym/walking/calorie counting worked wonders for me and I got down to 18 stone in 10 months but even I've put a little back on thanks to the stresses of the pandemic and various other stuff, it's a constant struggle. If you miss one day of focus it can honestly feel like you've taken ten steps back. I'm back on track though at last.
Good luck to him!