It makes sense to think that the T3SS didn’t evolve into the bacterial flagellum, but that the bacterial flagellum shed some protein parts to become a T3SS.
Macrobiological features have been cited as irreducibly complex, including animal joints and the trap mechanisms of carnivorous plants, even the cell itself.