I just stumbled onto this thread as I am having this same problem with overheating and it’s ONLY happening while using Safari and mostly on this site. Having said that, I followed the suggestion to download an ad blocker, specifically AdGuard, and the phone cooled down immediately. it was so bad that my phone’s screen would dim down all the way to where I could barely see the screen. Also, the battery was going down quick.
Maybe Apple could integrate ad blocking into their future iOS releases to combat this issue. I bet a lot of phones get returned and replaced for overheating when the problem wasn’t the phone but the ads.