This is why there are macos alternatives popping up like airyxos and hellosystem (bsd based). Plus the apple store could make it easy to disallow programs government don't like. This page explains it much better then I can:
Discussion
I totally agree with your comment, but we must differentiate between privacy and security. Is macos good from a privacy point of view? No but it is better than for example windows. Is linux in general better from a privacy point of view than macOS? Yes, it is. Is Linux in general from a security point of view better than macOS? No.
Although the latter is not very nuanced, for example a vanilla fedora is much better than a vanilla arch linux from a security point of view. But a vanilla macOS is more secure than a fedora, that's my opinion of course.