There are two compartments. One has a man sitting quietly in it.. One has a woman sitting quietly in it. They are both of equal height and weight. Which compartment would you prefer your teenage child to get into?
Not sure.
I've only once had a problem with trains - started on a platform - I'm not sure how much a risk I actually was but I was freaked - deserted platform two guys not being nasty but persistent offering a drink and getting in my space.
I was relived when two women came down the steps - they took one look and went as far down the really long platform as they could get - which was quite far.
It was a middle aged guy who turned up on the platform that clocked I was uncomfortable and came and started a conversation with all of us and when I walked a few carriage to a busy carriage and found the two men had followed and sat opposite he followed along and sat with us. Subtly made sure I was being met and when he had to get off first he rushed off which I thought odd then saw him talking to the guard who then hung around a bit more than usual.
I don't know how much that experience is colouring my perception but talking to other people they aren't surprised it was a guy or in friends example a mixed group or group of men who step in - least likely is a lone female.
So they may well be safe in a carriage with a lone man if someone else come on and gives them hassle but again depends on the man involved.
It's that pesky context again.
DH had one or two rare problems on trains as well - we've done a lot of differing journeys - surrounding people looking for fights rather than fearing sexual harassment. That's not a problem I've ever had.