organization before electronics before concrete. some amount of infrastructure will fix congestion, how much depends on what precise timetable will be run. the swiss manage to run a huge amount of freight alongside many passenger trains because they did their homework and built infrastructure where it was needed.
in general, "precision scheduled railroading" has fucked passenger-freight interoperability in the states because the freight railroads are running trains too long to fit into any of the sidings, which forces amtrak into the pocket