Why would it be a security problem if installing an OS twice was byte for byte identical? Don’t distributions (like Fedora Silverblue) already do this?
I'm not sure if they actually share /usr or unconditionally rebuild it on each device (after all, they do need to handle different sets of installed programs).
But /etc/ and /var/ in particular need to be system-specific regardless (even though you may be used to thinking of them as being on the same filesystem as /usr/).