Some terrorism might have indeed been prevented if some of the security measures had been put in place earlier. E.g. locked cabin doors. I could make a similar argument like yours, "that's like worrying about nuclear safety programs just because we started building nuclear weapons".
Not that I'm saying it's worth it, mind you. It's a tradeoff between money/time/progress vs. safety. It's totally valid to decide that it isn't worth the tradeoff to stifle the industry right now.
The main difference though between the potential dangers of AI, vs. terrorism, IMO, is that the potential danger is much much larger with AI (as it was with nuclear weapons).
The real risk now is not AI taking over, it's humans using AI to abuse other humans. I trust the emerging AGI to do what's right more than humans. We can't even distribute enough food for all, and many of us get killed or abused at the hands of our leaders. We can be easily bullshited in elections, and as a result we managed to put Trump in charge. That's not very intelligent for a self declared intelligent species. We are our worst enemies, AGI will probably balance human society.