Is going by train safe in South Africa?

The train system in South Africa is not the most advanced but investment is taking place to improve it. In some areas it is excellent whilst others still need better infrastructure. By daylight (during peak hours) trains are safer than at night.