This is the problem, because you know what else is controlled by the market? Your employment. I fully encourage going on strike if asked to make surveillance tech, but you will be fired for it. Then some other firm will be hired, and, oh well.
If "the market" controls democracy, to the extent that the "democratic" government demands surveillance tech because someone on the market wants to sell it, that's the problem to be solved, not a shortage of research scientists martyring their careers for no effective gain against the larger social pathologies.
EDIT: what I mean is, roughly, markets are how we usually screw ourselves up in the first place.
And it's doing a great job of it.[1][2][3][4][5][6][7][8]
[1]:https://en.wikipedia.org/wiki/NSA_warrantless_surveillance_(...
[2]: https://en.wikipedia.org/wiki/Room_641A
[3]: https://en.wikipedia.org/wiki/National_security_letter
[4]: https://en.wikipedia.org/wiki/COINTELPRO
[5]: https://en.wikipedia.org/wiki/Project_MKUltra
[6]: https://en.wikipedia.org/wiki/J._Edgar_Hoover
[7]: https://www.eff.org/deeplinks/2014/05/how-nsa-transforming-l...
In fact, they’re all actions that show that an informed public debate regarding new technologies is needed to protect the public from not only unscrupulous businesses or external threats but to protect the public from their own authorities.
Without public debate and a public that demands robust protection in the fit of laws, misused technologies represent a threat to everyone until that debate is had.