I don't know the Hilton, but I've stayed at the Sofitel multiple times before flights or a long layover (all since before pandemic times, so some of these memories may no longer be quite as valid). It's a very nice hotel, very soundproofed with comfy beds, which was all I cared about -- I didn't bother with any of the amenities since I was there mostly to sleep before catching a flight or meeting up with family for a couple of days before traveling elsewhere.
To get from Terminal 2 from Terminal 5, you can use the Heathrow Express train system. It's free, but you do have to get a ticket. Once you're in Terminal 5, there's a loooooooong walkway from the terminal to the hotel (to be fair, almost any hallway in Heathrow feels long, but seriously, it's a bit of a hike), but at least you don't need to use a shuttle.
Inside the Arrivals terminal is a 24 hours Marks & Spencer where we'd grab snacks or a packaged sandwich/etc instead of paying $$$ for hotel food. There's also a WHSmith and a Boots nearby -- not open 24 hours, but still convenient if you've forgotten a toiletry item or want to grab some non-M&S treats.
The main perk of the Sofitel is you don't have to figure out where to catch a shuttle (other than using the Heathrow Express). I don't know if you plan to use Disney's transportation to bring you to the port at Southampton, but it will likely also be convenient for that since it's their partner hotel.
The drawback is it's not cheap, so the Hilton might have a better deal if you're looking just at pricing or if you have membership perks.