Each can was pig-tailed as the connections were made up. Since they failed individually, it seems that the individual wire that leads to the fixture's wiring came out of the wire nut that connects it to the incoming hot and the outgoing hot (at least at the earlier cans in the string), leaving the incoming/outgoing wiring sufficiently well connected to bring power to the one that still works.
Note that "sufficiently well connected" may still not be properly and safely connected, as the missing wire from the wire nut may mean that the nut is now loose and could allow for arcing which could start a fire.
In the box behind each can, there should be a hot (usually black), neutral (usually white) and ground (usually bare) (note: US wiring conventions, assuming cable, not conduit). At all cans except the last in the string, there will be a cable incoming from the previous can/breaker, a cable outgoing to the next can, and a set of wires that go to this can. It's likely that the "this can" wire has come out of the wire nut non-working ones prior to the working light, and that any/all of the nuts have come lose at the non-working lights downstream of the working one.
You, or your electrician, will have to pull each can and confirm that all the wiring is still properly connected.