These plastic stanchions are very fragile, as you discovered. Several years ago I needed 3 of them but they weren’t available as an individual part; you had to order the handrail which came with the stanchions. It might be available that way for your locomotive.
Since then I have had a couple of others break. I repaired them using black silicone applied and shaped with a toothpick.