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.
I discuss my recent painting of butterflies, emphasizing the process of metamorphosis from caterpillar to butterfly as an example of irreducible complexity. This signifies intentional design rather than Darwinian evolution.