The ontology allows the representation of knowledge in a formal, explicit and reusable way by considering the semantics and interoperability of the application domain. These characteristics give ontologies a useful role in knowledge engineering with a view to formalizing, structuring, representing, capitalizing and reusing domain knowledge with the power of explanation and interpretability of data and knowledge, thus making it possible to mitigate the problem of bias involved in AI systems (black boxes), notably deep learning by providing a clear explanation in the decision-making. This article provides a literature review of applications of ontologies and knowledge graphs in the field of rail transport safety. This study shows that despite the significant impact of ontologies and graphs for railway risk management and accident prevention, several applications face obstacles. A new conceptual model called “HEXA-Onto” is proposed which is structured around six iterative and complementary dimensions: (1) knowledge acquisition, (2) identification and specification of the domain, (3) formalization, structuring and representation of knowledge, (4) knowledge extraction techniques, (5) ontology development phases and (6) components, constraints, languages, tools and ontology editors.