Here is a patch that allows players to add priorities to schedule entries. When a convoi loads freight, it first looks for freight going to stops with higher priority. Stops with the same priority are treated in the order they appear in the schedule, as previously (next stop first).
For example: given the following line:
1) Stop A (100%)
2) Stop B
3) Stop C
4) Stop B
vehicles at stop A will load freight to stop B first, then to stop C.
If the priority of stop C is raised:
1) Stop A (100%)
2) Stop B
3) Stop C (priority: 120)
4) Stop B
vehicles at stop A will load freight to stop C first, then to stop B.
Note I am not sure of the position for the "Priority" input in the schedule GUI component.
My personal comment would be that this works for goods, but is highly unrealistic for passengers. But as I am not playing simutrans any more, I have little say in this, I think. Maybe it should be allowed or forbidden as a setting.
On the implementation, there is an ordered vector template, which would handle the insertion according to priorities.