It’s mostly just magnesium and calcium salts, likely carbonate but some sulfate as well, depending on the chemistry of the water.
A bigger concern with drinking hot water is bacteria if you don’t keep the tank hot enough, or lead from soldered joints. Hot water will leach stuff from your plumbing faster than cold water.
But overall, in a normal, modern system, drinking hot water from the tap isn’t particularly risky.
Also keep in mind that yellow sludge comes from somewhere... like the cold water coming into the hot water tank. So... it's probably in the "healthier" cold water no different.
This article from the Denver water department says, don't drink the hot water: https://denverwatertap.org/2017/12/13/psa-dont-drink-cook-ho...
It would actually be kind of funny to go into a restaurant and refuse to order anything because you don’t know how anything is made.