In the UK, there are various accepted ways of safe work on a railway, followed by both public and private sector employees and contractors.
One of them has a lookout at each end, who alerts the workers whenever a train approaches. Work stops until the train has passed, because the distraction caused by operating loud and heavy machinery is ao high. (The train only sounds the horn once, unless the driver fails to see an acknowledgement from the lookout.)
However, this isn't really practical on a busy line like a metro, so they'd much prefer to work overnight with the line closed if possible.
It's also possible to fence off the work area from live tracks, but installing the fence is then the disruptive work.
> as long as these workers are smart enough to not encroach on the active lines.
That attitude is completely at odds with the European approach to worker safety.
(I cannot comment on whether either point applies to the USA.)
As an example, there's are descriptions of the failures of the safe working system in the reports of accidents, such as this one: https://www.gov.uk/government/news/report-122019-near-miss-w...