I don't think that's true at all.I don't think people back then thought that far ahead, really. It more or less explodes the myth that people in the past were particularly conscientious.
It's merely an example of evolving safety standards.
The innovation of blade slots to medicine cabinets shows that the dangers of used razor blades were being addressed. In the 1950's, manufacturers moved to metal blade dispensers to make blade handling safer. These came to include a used blade slot in the back to safely store used razor blades.
It should be noted, that these safety innovations were created entirely with user, family, and children's safety in mind. None of this was done to protect refuse workers!
The idea that used blades in walls pose an unacceptable danger to plumbers, carpenters and demolition workers would have been laughed off as absurd, back then.
In fact, I would argue, it's still worthy of being laughed off as absurd to-day!
The only real danger here, is the application of twee millennial thinking to the actions and standards of people of the past.