The life expectancy of a Starfleet captain should be calculated in ways similar to others. The job may be stressful, but medicines exist to counteract it. Starfleet captains don't generally go down with the ship (good captains are hard to find), and they usually survive many encounters from general respect of from enemies. Thus, the only way for a captains life expectancy to be shortened is from accident, but many of those scenarios put the other people on the bridge in danger as well. The personnel on the bridge are among the closest to the escape pods, so it should be the 100-120 year life expectancy of other Humans (or whatever life expectancy for their species), so the personnel on a starship have similar risk when you think about it. The captains should be okay.