In this paper, risk modeling was conducted based on the defined risk elements of a conceptual risk framework. This model allows for the estimation of a variety of risks, including human error probability, operational risk, financial risk, technological risk, commercial risk, health risk, and social and environmental risks. Bayesian network (BN) structure learning techniques were used to determine the relationships among the model variables. By solving a bi‐objective optimization problem applying the genetic algorithm (GA) with the Pareto ranking approach, the network structure was learned. Then, risk modeling was performed for a petroleum refinery focusing on HydroDeSulfurization (HDS) technology throughout its life cycle. To extend the model horizontally and make it possible to evaluate the risk trend throughout the technology life cycle, we developed a dynamic Bayesian network (DBN) with three‐time slices. A two‐way forward and backward approach was used to analyze the model. The model validation was performed by applying the leave‐one‐out cross‐validation method.