Limiting the ability of nations to export this kind of capability as a product for other entities to use is precisely what "trade ban" would do.
You're right that a trade ban won't affect the ability of nations to develop and deploy their own spyware, but most of the targets in the Pegasus dump seem to be of people peripheral to smaller governments that don't have this kind of capability themselves (which is exactly why they buy it!).
Who would issue and enforce such a ban? The US?
I can't tell what your point is, exactly. You're just making a cynical point that this won't work so we shouldn't even try?
It's like banning arms sales to countries like Saudi Arabia. All it does is push them towards China or Russia.
Banning this stuff just leads to consolidated power blocs of nasty regimes.
Again, that's experimentally false. Saudi and Mexico didn't develop their own home-grown spyware. They bought an Israeli product instead. This stuff is harder than you think.
DPRK manages this shit, it's in the reach of any nation-state.
if you're in a precarious political position, a homegrown entity that produces these tools can quickly become a threat; the citizens you train/employ will have their own political ambitions, nationalistic tendencies, empathy for their fellow citizens, etc.
there are most certainly situations where it's safer to just outsource your natsec/tradecraft to an entity that only cares about their bottom line.
Saudi and Mexico don't produce many homegrown weapons systems either. Again, non-proliferation is well-travelled territory. In fact most of these things are not something small governments will have access to if big governments don't give it to them. And treaties restricting trade in these things are known to work.
Every single government uses such tools. The ones that don't likely have bigger problems such as sustenance, lack of electricity, etc.
What people should be looking at is the crazy amount of Israeli presence in the so called cyber security sector. I can think of a few such companies that literally spy and track hundreds of thousands of people all over the world. The government is using their services and therefore lets them whatever they want.
I know a few guys working for such companies. No longer friends with them. Works foriteral evil. No better than military types