Balancing safety with sustainability: assessing the risk of accidents for modern low-carbon energy systems