It's up to you to decide if it is safe or not. I am not familiar with the exact interior of different locomotives. If there is 0 chance of mishap, then it is safe.
@all:
Unsafe generally means the following:
1....
more... You are standing at the door or any such opening where you can slip and fall, while being distracted with your phone. Maybe a train jerk, a train banking while negotiating a steep curve, a passenger accidentally pushes you, etc.
2. Your phone can accidentally slip from your hands, and you instinctively try to reach to save the phone, and in the process, you yourself fall out.
3. You are standing at the edge of the platform engrossed in your picture, and so do not see a fast train approaching, which can either hit you or suck you in. Also while standing near the edge, someone can accidentally push you.
4. You are taking a selfie near the tracks, and do not hear a train approaching.
5. You are extending your hand far out of the train to capture the curve, and some pole or other object can hit your hand.
6. If anyone know of any other dangerous situations, please feel free to write it as a reply...
If you are sitting in your train seat and taking videos, then there is no chance that something bad will happen. If you are standing at a PF a safe distance from the edge and taking a video/pic, again, there is almost no chance of losing your life. So such activities are OK, where there is 0 chance of mishaps.
Generally, most dangerous activities "seem" OK, because 99% of the time nothing happens. And we get more and more confident. But in 1% of such cases, we can end up with injury or death. So to protect against the 1% cases, such chances should not be taken. If an accident "can" happen, it "will" happen.
So far, we are very fortunate that nothing untoward has happened to any of our RailFans. But these things keep happening to YouTubers, Tiktokers, etc. So at least as far as this site is concerned, we won't get some great captures. Our loss. That's fine. The health and safety of our travelling RailFans is always the #1 priority.
Thanks.