In the majority of cases, the reason these lines do not work is that the travel time + waiting time is greater than the time it would take for the cargo (or passenger) to travel to their destination themselves, also there is a 20 minute travel limit on this.
You need to make sure the frequency shown in the line panel is not too high.
For instance, using your example and made up figures…
1 train running from coal > ore > foundry > city
Coal > Ore = travel time of 5 mins + some for loading
Ore > Foundry = travel time of 5 mins + some for loading
Foundry > City = travel time of 5 mins + some for loading
City > Coal travel time of 10 mins + some for loading
The train would stop at the Coal station every 20 minutes (+ loading times) , making the waiting time for the goods exceed the travel time allowed, so they wouldn’t use it.
Now you could break this up, depending on how the route is laid out and the actual line times for each point to point
So for instance, one train going Coal > Ore > Foundry
Then another Foundry > City > Foundry > City
I know you mentioned foundry > city via trucks, but regardless of the logistics, make sure the total travel time is under 20 mins period.
Think I have worked that all out correctly, obviously figures etc would vary but as far as I have discovered, that is the general principle. Excusing any mistakes I may have made 😛