Probably, but I think you are giving most bad actors too much credence. Tyler Robinson took several precautions to cover his trail in his assassination of Charlie Kirk—but he also told many individuals about his plan on discord, as well as other non-encrypted channels, etc. Not all bad actors are sophisticated in the same way.
I wouldn't trust the government with the power. If the scenario I'm posing were to actually occur, it's only a matter of time until the gestapo starts showing up at the houses of innocent individuals. This sort of thing happens in China.
Still, again, if the threat is big enough, I am curious to ponder what role individuals would want government to take in using surveillance to reduce actual human deaths in terror attacks (or any type of attack, for that matter).