The HDMI cable should not be "loose and wiggly" at any point! Have you tried other cables to confirm that it's socket that's damaged and not the plugs on the cables? That would save you a lot of headaches.
There are two mechanisms to hold an HDMI cable in:
- The first is a couple of leaf-spings in the socket that push into the two indents/holes on the top of the HDMI plug. It sounds like these could be loose, worn or broken.
- The second is the the HDMI socket design itself - the insertion depth is almost twice the socket height, meaning that there's a high level of alignment even with low-tolerance cables.
I hope I'm wrong, but it sounds to me as if the HDMI hole machined into the side of your macbook is still undamaged, but the actual female HDMI socket soldered onto the board is loose or damaged. You can replace these cheaply, but there's a high labour cost to resolder the new one if you're not experienced with macbook disassembly and electronics soldering. I'd get someone who's experienced with laptop repairs to take a look at it. They'll be able to spot a damaged socket without dismantling the laptop, most likely.
Feel free to take a high-resolution photo of the port using macro mode on your phone/camera and upload a link to it here, but loose ports are usually something that you have to "feel" or at least see the wiggling in motion to diagnose.