All software has bugs, including Linux. Some bugs can lead to security escalation. Those bugs are called vulnerabilities. Like bugs, all software has vulnerabilities - including Linux.
Your webcam can be accessed by hackers on Linux, on Windows, on MacOS, on BSD, it doesn’t matter.
For your use case, consider it to be a packaging format (like AppImage, Flatpak, Deb, RPM, etc.) that includes all the dependencies (including services, not just libraries) for the app in question.
If it’s not broken don’t fix it.
Use Podman (my preferred - the SystemD approach is awesome), containerd, or Incus. Docker is a graveyard of half-finished pet projects that have no reason for existing. Podman has a Docker-compatible socket, so 100% of Docker tooling will work with it.