The way I've done something like this is :
I have compiled a simple database with a "to" point and a "from" point ,
The two point lists all of the tiplocs accessible from the FROM point
A mileage and chainage captured from the sectional appendix is in said sheet between those two points.
Using an algorithm you can give your program the from point and to point, and with some parameters of some sort, to work out the points involved - like a shortest route algorithm or something.
Then return the points in that route (the non mandatory points)
For the timings my use case probably needs some refining, but in its simplest form;
Using the mileage and chainage, and use the departure time and arrival time between the two primary tiplocs timetabled. Use the distance speed triangle or whatever, to work out a speed the train is using between the two mandatory tiplocs, and factor in the mileage to the non mandatory tiplocs with the speed, to deduce a time it will pass.
Now obviously you've got things like line speed etc to take into account, so it's not perfect. Some tiplocs are further than others in between but in my usage, I've used the time it takes between the two mandatory points, to work out a speed using the mileage too, and used that to work out a time with the mandatory to non mandatory points.
Others can comment but that's the way I use for my own personal useage.