I can think of doing this project several different ways.
Mechanical method: The reservoir that would fill the toilet tank would have a float system just like the toilet tank system. If the reservoir was empty the float would be down and the valve would be open. When the shower is turned on, the open valve would cause the water to go to the reservoir instead of the shower head. When the float shuts off the valve, the water would return to the shower head. The system could be tuned by adjusting the float height, so that only the cold water would be bypassed to the reservoir. The mechanical method would be very robust, but could only handle a 1:1 shower to flush ratio.
Electrical method: By using electronics and sensors, the reservoir could be larger, potentially saving more water. The water could bypass the shower head until a specific temperature is reached. The electrical method would also allow for other ideas to be incorporated (like volumetric feedback etc).
Either method would be an add-on to existing systems, not a replacement. If no saved water was available, the toilet tank would refill in the normal manner.
Years ago I purchased and installed a device that pumps water from the hot line to the cold line. It was kind of expensive but I didn't have time to build my own. It has a temperature sensor that stops the pump when the water get hot enough, though it almost always cuts off early. It worked for several years then the valve that prevented cold water back filling failed so I installed a manual shutoff.
IMHO, the architects in the US do a poor job of designing plumbing. In Europe, each place that needs hot water has an instant hot water heater rather than a big tank in the garage and long pipes that are usually not insulated. I believe the recirculating pump is a solution that benefits the plumber, not the homeowner. More pipe to install, more devices to repair, and more energy wasted.
When I lived in California during a drought, I had a bucket to capture the water, which I then watered the garden with. Your plumbing would make that easier, in fact you could simply add a drain to the outside with a faucet to water your plants. The tricky part of filling the toilet tank would be to fill it first with the stored water, then with line water if that's not enough. Maybe your storage tank could have a float like the toilet tank?