Under capitalism, a lot of the time, highly dangerous jobs are also highly paid. Kind of a balance that the individual decides to engage with. Same idea behind getting an advanced degree in STEM or law. I think of my job by example, I’m a power plant operator at a large combined cycle plant. No fucking shot I’d be doing this if the pay wasn’t good. I’m around explosive and deadly hot shit all day.


You get more stuff, more status, etc. Or alternatively, penalized, threatened, etc. Whatever it takes to motivate people to do the job. Even if paper money isn’t a thing in communist societies (which it still is), money’s just a symbol for debt. You’re going to get something, somehow, for a job people greatly desire to be done without enough doers and they’ll become “indebted” to you disproportionately for doing it.
In Soviet society for instance, you might be provided a nice apartment in central Moscow if you were doing something “important”. This assignment would be via your government-controlled employer and their agreements with some other government bureau that officially managed the buildings to dole them out to select people.
So, same deal as anywhere else, just a different mechanism. Higher ration, bigger dacha, jump to the front of the line to get a car, etc.
Compensation is usually not much about how dangerous a job is, though. It’s more about how many people are willing to do it for any number of reasons. Some people are just not very risk-adverse, and figure they’re going to be fine at a job that is more dangerous. And they’ll be compensated at a normal level as long as there are enough such people to fill the need.