Another example is that most economists admit that as women entered the workforce en masse, prices settled higher for the same goods and services. Now survival requires two incomes instead of one. It was a massive net loss to society, but we also agree that women should be free to work if they would like, without barriers. We see similar things with women becoming educated. The more educated women become, the fewer children they have. That's really bad for society, but we also want women to be free to become as educated as they like.
Sadly I see no easy solutions here because it requires weighing individual and societ-wide rights. Companies aren't going to risk higher rates of misconduct to benefit society broadly. These are collective action problems, and unless we find ways of individualising the problem, they're only going to get worse.