My personal opinion is to have the fan in the shower, moisture does the most damage, get it out.
However, I’m all about being optimal in design. So with that, Forget about the typical noisy squirrel cage ceiling fan. Have an inline fan, or an exterior wall mounted fan and have the suction duct split, one within the shower, the other down low behind the toilet, or if you have a seperate toilet room which is preferable, then the suction location doesn’t matter as much in the toilet room. You get both airborne issues out and its quieter. inline fans are usually more eff icient can pull more cfm or can be variably controlled.
I’d rather put a dedicated HRV in the bathroom if I had the roof, but it’s hard to design for when they are usually 3-4x the cost & 3-4x less airflow of a good inline fan.
Btw, It’s 2022, I think by now toilets should have suction integrated within them by now. Kind of like the Aussie fantech Odourvac (yes, google it). We have toilet seats singing songs to us now and having light shows and stuff…. Let’s get it together toilet designers! Ventilation is important.
Jamie