You could probably do it with a sensitive vibration sensor; I know that's what folks do for basic washer & dryers. I imagine the commode shakes a bit when flushing.
1. That would capture all water usage, which is not helpful when you're trying to take specific action based on water usage in a specific room. No point turning on the wrong bathroom's fan, or turning it on when you do laundry.
2. Presumably if you're ventilating the bathroom for odor control, you wish to ventilate it long before the toilet in question is actually consuming water, since it only does that at the end.
Ideally if you're trying to turn the fan on during toilet usage, you'd want a way to detect that the toilet is in use long before said toilet is using water. Presumably motion would be sufficient, although I guess one could detect weight on the toilet somehow.