Anyway, here’s some more:
Wong, Tim; Amidi, Arezou; Dodds, Alexandra; Siddiqi, Sara; Wang, Jing; Yep, Tracy; Tamang, Dorjee G.; Saier, Milton H. (2007). Evolution of the Bacterial Flagellum: Cumulative evidence indicates that flagella developed as modular systems, with many components deriving from other systems.(Archived here : PDF). Microbe . 2 (7): 335–40.
Pallen MJ, Gophna U. Bacterial flagella and Type III secretion: case studies in the evolution of complexity. Genome Dyn. 2007;3:30-47. https://doi.org/10.1159/000107602
Snyder LA, Loman NJ, Fütterer K, Pallen MJ. Bacterial flagellar diversity and evolution: seek simplicity and distrust it? Trends Microbiol. 2009 Jan;17(1):1-5. doi: 10.1016/j.tim.2008.10.002
These at least seem to deal directly with the evolutionary origin of the flagellum.
There are many more articles on the evolution of many different types of flagella from some common ancestral flagellum. It’s important to understand there is no one THE bacterial flagellum. There are many thousand types of flagella having evolved in different lineages from some common ancestral structure that only had a subset of the many different components seen in these different versions:
Rossmann FM, Beeby M. Insights into the evolution of bacterial flagellar motors from high-throughput in situ electron cryotomography and subtomogram averaging. Acta Crystallogr D Struct Biol. 2018 Jun 1;74(Pt 6):585-594. doi: 10.1107/S2059798318007945
Terashima H, Kawamoto A, Morimoto YV, Imada K, Minamino T. Structural differences in the bacterial flagellar motor among bacterial species. Biophys Physicobiol. 2017 Dec 19;14:191-198. doi: 10.2142/biophysico.14.0_191.
Denise R, Abby SS, Rocha EPC. Diversification of the type IV filament superfamily into machines for adhesion, protein secretion, DNA uptake, and motility. PLoS Biol. 2019 Jul 19;17(7):e3000390. doi:10.1371/journal.pbio.3000390.
… and on and on it goes.