I have looked at satellite photos of the area and there appears to have been some excavation in 2020. Were they reinforcing the railway and ended up creating a “dam”? 2019 satellite photos don’t show the excavation meaning it began in 2020.
I believe the channel under the railway got blocked and a huge amount of water was trapped on the upper side of the railway and the embarkment plus railway collapsed and the trapped water gushed downstream causing huge devastation.
2021 Satellite photo of general area showing site of excavation next to the old nairobi - naivasha - nakuru railway.
You are right this was a picture taken by a concerned Embobut forest team B member that was scouting Ngong forest to gauge its suitability as a branch of Embobut. That is water accumulating
Kenya railways engineers should have known that the pooled water was a disaster in waiting since it would collapse the railway and also cause devastation downstream. They should have pumped the water to drain it or unclogged the tunnel/drainage to have controlled release/movement of the water. NB this is railway that connects kenya to Uganda/kisumu and is used frequently.
The route was chosen to drop down the escapment ie drop from the kikuyu escapment down to the kedong valley below. And FYI the maasai never opposed building of the railway.