This doesn't answer your question, but Great Britain tried during their colonial rule. I'd be curious too though about a modern version.
https://en.wikipedia.org/wiki/Cape_to_Cairo_Railway