Something along this approach has been used in "modern" house hydraulics in the last few years here in Italy, though not common, as it is used only AFAIK in self standing houses (not apartments buildings).
In practice there is a reservoir where the "almost clean" waste water (i.e. what comes out of the bath sink, bidet and shower/bath tub) is accumulated.
Toilets are fed by a pump with water coming from this reservoir, in practice you use the same water two times.