It depends on the defintion of taint. Homebrew cannot touch the base system, since it lives in /usr/local in macOS. Also macOS SIP prevents modification of most system files.
One major problem is that system and Homebrew versions of library may have incompatible ABIs.