It's not the same thing. A CMOS sensor, especially a cooled, astro-class CMOS sensor is much more sensitive than eye.
The random noise in photography is emitted from the sensor itself and has a distinct profile. This profile can be extracted with certain procedures and can be used as a single pass NR process with very high quality results (Darktable's Profiled NR does this if the camera's profile is generated/bundled). Also Subtractive NR does something similar. After the exposure, a closed curtain exposure is taken with same shutter value and that image is subtracted from the first image. Since it's a per-sensor process, its quality is very high too.
Light pollution is also somewhat similar. It's a specific wavelength, emitted from ground to sky (so its gradient can be known) and can be filtered out relatively easily with stacking and other RAW processing (assuming your image has enough bit-depth and headroom in both highlights and shadows). There are also new filters which directly filter this kind of pollution IIRC.
Stacking does something similar. Pixels with high consistency is kept, low consistency is discarded so you get a clean image. Sorry, I don't know its exact math since I don't have a tracker and don't take many astro photos.
However, in an analog recording you have incomplete information and you want to put it back via ML, which is basically a very educated guess in this case. A well tuned and trained ML model would probably put back sensible or semi-sensible details back but, it cannot guess and re-generate the missing parts with 100% accuracy.
So at the end of the day, in photography, you have the ability to get the complete information (via stacking or subtractive NR or by cooling the sensor a great deal) however, in an analog recording, you don't have the complete information. Especially if you record it via a speaker to microphone path (since they're not ideal reproducers).
We may go to the sounding characteristics of analog audio pipelines and vinyls from there but, that's another rabbit hole I'd rather not dive now.