Lots of old houses had a slot in the bathroom for razor blades disposal. Put the used blade into the slot and it falls into the wall. I think this is a brilliant idea and we should still be doing it!
The trouble with razor blade disposal is that they are small and sharp. Putting them in trash bags and having them hauled away to the dump only poses a potential hazard to every person or animal that crosses paths with that razor in the future.
The wall is better. Once the blade is in the wall you will never encounter it again. It's safely sealed away and poses no risk to anyone.
Since razor blades are tiny, you will never run out of space in the wall.
There is no hygiene issue. The blades might rust a bit inside the wall over time, but they aren't going to grow mold or anything.
If someone remodels the bathroom and uncovers them, it's no big deal. They can literally be left there and just sealed up behind the new drywall. The ONLY time the blades would ever need to be handled again is if the wall was being demolished. In that case, they can all be safely handled and contained at once.
(Note that I am not talking about disposable razors...just razor blades).