Toilet brushes are probably one of the dirtiest objects we will have in our households. They are usually kept in a small container that can get just as dirty as well.
The main problem will be the bacteria transferred from the toilet to the brush when cleaning. A simple way to kill bacteria is to use UV light. If the brush was exposed to UV light when stored then it will stop bacteria cultivating on it. However, although the brush should be free from bacteria, it will still not be fully clean.
A simple method of washing a brush is to clean it with water, therefore if the brush was connected to a moving body of water then it could be enough to clean it. A place on a toilet where there is a moving body of water is in the water tank behind the seat. The brush could be inserted into the tank from the top, and the moving water combined with UV light should keep it clean.
The brush could also be rotated if the holder had a motor, which could increase the cleaning rate.
As always, if you think you have a solution or if you have a problem you would like me to try to solve then please feel free to comment it.