Two different gear collapse mechanism at work in the three accidents.
First two - attributed to corrosion, in turn partly attributed, it seems, to use of non-standard grease. Aircraft had presumably been like this for a while, in order to corrode. Grease presumably applied during some routine maintenance or inspection action.
Then ... mandatory inspections.
Then ... third gear collapse, apparently due to the much discussed migrating O-ring. Migration believed to have been facilitated during the disassembly/reassembly required for the mandatory inspections.
The only link between the grease/corrosion and the third accident is that it prompted the inspections, which caused maintenance to be done in the area, which apparently caused the O-ring migration.
That's my understanding of the situation, from watching the various discussions and reports.