An employee was loading phosphoric acid onto a rail car and preparing to secure the rail car for transport. While repositioning the loadout spout to secure it back to the drip pan holster on the dock, the spout contacted the handrail of the rail car, causing the employee to lose balance. The employee stepped back and their right foot entered the opening for the rail car, causing him to twist/pivot on his left leg. The employee's lower left leg was fractured.