Risk is meaningful to this discussion in that it deters people from taking the job. That reduces supply and boosts price. I don’t think lifeguards are paid a premium for being supply constrained.
California has a public sector compensation problem. (In particular, its unwillingness to investigate overtime fraud.) But estimating pay solely based on how dangerous the job is won’t be accurate.