I regularly take photos on stations and often near the platform edge and ends as I'm a track man and am more interested in the track, not the trains. I am always careful and always keep an eye out for approaching trains. I will take the photo then move back away from the platform edge straight away.
If I'm on Coventry, the staff know me anyway so they know I'm ok and I don't bother signing in. If I'm on Brum New Street, no-one has ever batted an eye-lid and all tracks are 10mph anyway so again, as long as I'm careful, there's no problem.
Anywhere else and I'll at least tell any platform staff nearby what I'm doing.
As someone who has watched someone who appeared to be minding their own business on the end of a station platform suddenly jump off said platform into the path of an 85mph express train with obvious results, I have every sympathy with staff who get a little uneasy with people hanging around on the end of platforms, although there is no need for immediate rudeness and aggresive confrontation.
I would happily explain myself politely to any staff members. I find that offering to show them my photos often diffuses any worries they may have. Most of the time they don't bother actually looking at them, but sometimes they do. I've even had a few comment on how interesting my photos are, and one who said "how boring, but whatever keeps you happy". They have then let me be!