Impossible to see young kids from large vehicles and people generally do not expect them by themselves near roadways. I can't imagine the grief the parent is going through but the idea of a 2 year old being anywhere near heavy equipment makes me think the negligence is shared.
The company should pay and perhaps there need to be additional security measures taken by public playgrounds but there is no substitute for attentive and always present parenting, especially at that age.
Btw, the OPs story is vague so I've had to fill in the gaps with some assumptions about what happened. I could be wrong if the driver was way out of bounds of expected behavior.
I grew up in Southern EU, and when I moved abroad I was surprised by 1) bins not getting collected daily and 2) collection trucks driving during daytime, which I consider both dangerous and a bit unhygienic.
I haven't heard much about the danger of garbage trucks to pedestrians in the past, outside of this instance, but perhaps it is a bigger problem than I realized. I will have to look into it more to arrive at a conclusion.