installing bathtub soap dish

How do you prevent plumbing clogs while saving energy and water?
I'm trying to do my part to save water and energy by using cold water whenever I can for laundry, wash dishes and hands, etc. I also try to avoid wasting water by not letting the bath sink and running, and have installed a tankless water heater for near instant hot water. The problem is that my pipes often backups due to the buildup of soap / shampoo / detergent / dishwashing detergent. I've read that flushing the pipes once a month with large quantities of water warm will help prevent and treat this problem, but that goes against my principles of trying to save energy and water. Does anyone have any good ideas for preventing plumbing clogs from soap and detergent buildup /, without losing a great amount of energy or water?
A simple solution is to use baking soda and vinegar. If cleaning the toilet with vinegar and sprinkle baking soda around the bowl instead of chemical detergents have less trouble getting started. To unlock sinks, drains, etc Loos, pour the vinegar in which then sprinkle baking soda to get lots and lots of excitement. Once settled, then rinse or rinse with a small amount of boiling water. Not once a week, is antibacterial vinegar and baking soda deodorizes. If backup is really leaving overnight, then repeat. If you clean with vinegar, salt and baking soda, then you do not get as many blocked drains. Similarly, if you use them for washing and softening laundry, there are fewer problems with washing machines, less mess and the clothes are much softer on the skin and too soft. I can use vinegar instead of conditioner to the hair every time I shower, get rid of the deposits in your hair and also keep the drains clean.