There is a relationship in that both the "Spongebob cluster" and a black hole has negative heat capacity. The math is already there in the virial theorem. See <https://en.wikipedia.org/wiki/Heat_capacity#Negative_heat_ca...>. Detailed treatments of the non-relativistic case you can find in an undergrad astronomy textbook; the relativsitic singleton case ehhhhh I don't think you're ready for it but Wald's General Relativity §12.5 & §§14.3-14.4 would be a good choice (and he shows you the math, which has been known for several decades), and for relativistic orbits I think you need to go beyond textbooks (although you probably could start with numerical relativity textbooks, like Baumgarte & Shapiro or Alcubierre, although I don't have either handy to double-check where they go with thermodynamics. Oh and the paper I linked in a sibling comment has a good and relevant bibliography. <https://academic.oup.com/mnras/article/516/3/3266/6668807>).