I will merely report on similar points as the comments, but I think that your question is based on a mis-conception. We can see two ways: canals pre-dates train (and by much!) and trains did not close all canals.
Long ago, canals were built for irrigation. Already in Mesopotamia, in Egypt or in ancient India. That already lead to some discussions about the land being used. As @his mentioned, the Grand Canal of China was built centuries before Christ. And it allowed already for some exchange in goods. The Greeks made the first Suez Canal to link the Nile to the Red Sea.
And to come to more recent constructions, you can think of the Canal du Midi in France, which was finished in 1680s. No trains by then.
- Rails did not kill canals
... at least not completely. You can see that some canals are still fully used now, when we have trains, planes, cars, trucks, etc. To name most famous to westerners: the Panama Canal and the Suez Canal still see a heavy traffic. Why? Because it is cheaper and can transport huge amount of merchandise. Also there are more water ways between countries than train could cover: how do you go by train from Continental Europe to Maghreb? Yes Turkey, Syria, Israel, Egypt... not what I'd recommend, these days.
Now that we cleared that up, we can see a few more points.
Why were the canals short-lived in the British Isles?
Actually they weren't really. Some irrigation canals were built by the Romans already. Further development occured in the middle ages. But it is true that the major development of canals in the UK took place starting from mid-18th Century and was almost abandonned by the turn of the 20th. However it seems that it was since improved and a few canals are still in use today.
But why aren't there large canals like in some other countries? Well essentially because they are islands. You can already get fairly close to your intended destination by sea fares. And there were not much traffic around the British Isles. Even for Germans/Russian, they could simply sail through the channel. The economy was essentially in limited areas (Dublin/Cork in Ireland, North-West/South in England..), all directly connected to the sea. I would think that together with the trains, it is the advance on sea-shipping that limited the development of canals in the UK.
Canals should help you gain time: Suez Canal avoids rounding Africa, Panama the same for South-America, and to follow the example above, the Canal du Midi helps to avoid the Spanish Peninsula (and as described in the Wikipedia article, to block an economic resource for Spain).
Why to build a canal and what to transport through it?
As I already wrote, you build a canal to gain time: is it faster to go through some place than around it. But that is only interesting if there is enough traffic. A canal between two villages is mostly useless: it costs a lot (money+people) but does not bring too much. Now if you have large cities and/or commercial roads on each side, and you divide by 10 the transport time between those. It does make sense. If you don't have the technology, you don't have to think about how to compete with trains, just that there should be enough goods to trade. But nowadays, coal, or oil, or even containers are goods that are often shipped through canals.
If your country/continent contains an isthmus of a few tens/hundreds/thousands (it's all relative) of kilometers, and that on both sides, you have very important commercial hubs, each with heavy traffic to both seas. And that going round was a huge trip and/or dangerous (weather, pirates, etc.). Then you could build a canal in between. And have your foreseen discussion.