There are existing commercial solutions that can address the HoA use case you describe here. Lots of smarts in the local NVR device on the network, or in the admin station that connects to the NVR device — follow the person in the yellow jacket, ALPR, and so on. Then you can easily add off-site storage, or whatever.
The problem is that these commercial solutions are expensive.
You could try to build your own with OpenCV and other tools, but that’s a really hard task if you’re not also selling for the same kind of money.