As I understand the smell is the problem. The naphthalene masks the smell but it too is a problem. So the issue is "How to reduce the smell". One answer is to cover it up. Anotehr answer is to dilute it.
When I worked in a school, we had a fly problem at some times of the year. We got a sprayer on a timer. It would emit a 1 second mist of fly spray every 10 minutes. One cartridge would last for weeks.
Substitute an air freshener (masking chemical scent) for the fly spray, and the same mechanism could work.
An even safer option would be to increase ventilation by increasing the air change speed in the room. Calculate how many hours you could run a 300 CFM fan on the price of one air freshener puck. This is solving the problem via dilution. The fan removes the smelly air from the bathroom, so that fresh outdoor air can enter.
If you have steady daytime breezes, there are wind powered ventilators you can mount on the roof. This saves power.