Is there such a technical possibility?
https://lua-api.factorio.com/latest/concepts/ScheduleRecord.html - here only "Name of the station". No uids.
There is another trick - to make intermediate points before the rails that are near the station - but it looks ugly in the schedule and does not always work. Even so, the train can go to another station that has the same name.
And unique names are needed so that the train does not go to the wrong station, I think you know.