Already happening and well-established in China
https://www.nytimes.com/2018/07/08/business/china-surveillance-technology.html
The technology is available now. The only question is how long before more democratic governments start using it.
People will allow their governments and State security services to implement this kind of thing, if they perceive that the threat from external agencies (or perhaps racial minorities, as in the claimed threat in China from the Uyghur) is great enough.
Is it such a stretch of imagination that governments, or proto-governments might seek to deliberately spread fear, so that the public starts calling for this kind of all-pervasive monitoring of their citizens?