Train staff were in 'fear of their lives', court hears