I think tooling is coming a long way to help with these - take for instance BEM. CSS modules is a great way to avoid needing BEM, as the bundler is handling the uniqueness of the classname for you (during minification etc.).
This is just the nature of web development - almost every tech in the stack is flawed, but tools and best practices make some sanity out of the chaos.
This is just the nature of web development - almost every tech in the stack is flawed, but tools and best practices make some sanity out of the chaos.