Waypoints may not seem necessary, and they wouldn't be if the driving AI was perfect, but sometimes the trains take the wrong path and you need to tell them exactly what they need to do, reset their instructions, and move them yourself. This line has 4 types of cargo on, for the most part, only two tracks. They split and merge when one of them needs to break off, but they all feed into the same line. If you're looking to emulate and improve upon what I did, keep them separate for longer and only merge when the trains need to make a stop or paths need to cross.
This first one shows one of the ends of the line, with one split so a set of trains can load up on iron and two more sets can access the factory. One of the latter delivers steel from the other end and the other loads up with goods. In these cases it's important to have enough platforms that every train which needs a full load can wait with enough space for something else to be delivered, otherwise they'll never move.
You can see one of the places it breaks off to make a goods delivery. If there's a possibility of too many trains waiting to deliver goods, put the junction further back than I did or add extra platforms so there's room for them to sit without blocking outgoing iron ore.
This is the other end of the line. Ignoring the extra track from an AI player, the double and triple stations are both mine. In order to not have one massive overburdened station, I split it up into two in order to reduce traffic. If every train shares a station, even if it has 6+ platforms, they always have to wait for each other as they approach the station because one of them is always somewhere in the junction.
Here's another line from a different game which looks more like a regular mainline, albeit in an urban environment. This one looks more complex overall but is actually less so. It looks deceptively complicated because trains are running on multiple levels and crossing over each other. The station visible here is a goods delivery, and the other trains seen going off is loading with oil to deliver to the same refinery that the other train is getting goods from, with a third shown leaving another oil well on screen.
This shows more of the multilevel junction. What's important to note about these setups is that they began as a single supply line which later either merged with another line of the same type or shared a similar destination with another. These are easy to do because they share a station somewhere but you can just as easily cross the paths of two independent lines to make it look good or save on money.
And this is the result, a busy set of rail lines adjacent to one another, some with common destinations, some without. The passenger line below actually shares no track but it was convenient to run it alongside the other. They may look complex, but mainlines are just a bunch of individual tracks sharing space.
Someone with a smaller screen please warn me if these images break forum tables.