@Fancyface, we need some clarification here. The vehicles involved in the incident, was you pal following the truck or they were driving in different directions and the lock fell from the side?
However, Keeping distance or not there is some negligence from the contractors. When loading the tippers, the should consider the safety of other road users.
Doors of opportunity don't just open , they have to be unlocked & it's up to you to turn the knob.