Given that everyone carries a mobile phone to summon help, the danger from being left in a locked train in the depot would now seem minimal.
There is risk associated with it, none the less. I don't think you could call it minimal either.
Firstly, the railway goes to great lengths to differentiate between passenger lines and non-passenger lines. There are restrictions on running passenger trains over goods lines (or sidings), and special arrangements that have to be made before a passenger train is run over a goods line (or siding). Facing points are probably the most obvious - a passenger accidentally taken onto a depot will quite likely also be taken over a number of sets of unlocked hand points, where the derailment risk is considerably higher.
Once the passenger's on the depot, there's then risks associated with retrieving them and returning them to civilisation. Returning the train to a station, in a reasonable timescale at least, might not be possible, so they might have to climb down to track level and then (accompanied, of course) negotiate all the risks of what can be a very dangerous environment.
There's also a customer service aspect too, obviously.
I'd still say that the risk, overall, is relatively low - but it's still best avoided, and it's right that companies have procedures in place to prevent it from happening and investigate what's gone wrong when it does happen.