Should some neutral particle electromagnetic decays also involve the weak force?

Take, for example, the neutral pion, π0. 98.823% of the time, it decays electromagnetically, into two photons:

π0 → 2γ

On its face, this process does not violate any flavor quantum numbers: the lepton number, baryon number, isospin, charm, strangeness, bottomness and topness of the neutral pion are all 0, exactly equal to those of two photons. With no flavor change, the weak force does not need to be involved in any stage of this interaction; it is indeed a purely electromagnetic process. That is so although theoretically, the neutral pion could decay into a Z boson, which would then quickly decay into the two photons: π0 → Z0 → 2γ.

However, the neutral pion contains two valence quarks. Each of these constituent particles does have flavor quantum numbers, such as an isospin of ±1/2. In the electromagnetic decay process, these numbers just disappear; there is no "memory" of them in the two photons. Is it simply that due to the quark meeting its antiquark and forming a zero-flavor hadron, the flavors of the constituent quarks can be completely ignored for conservation law purposes? In other words, does their "masking behind" a hadron allow the quarks to turn into something non-quarky (a photon) without any involvement of the weak force?

This question is also fully applicable to other neutral, unflavored system decays, such as an electron-positron annihilation.

theoretically, the neutral pion could decay into a Z boson, which would then quickly decay into the two photons: $\pi^0\to Z^0\to2\gamma$.
If you use the word decay, you mean that $Z^0$ is a real particle. But consider how much heavier $Z^0$ is than $\pi^0$: this is not possible. What you mean is a virtual $Z^0$. And then there is no $Z^0\gamma\gamma$ coupling in the Standard Model Lagrangian, so the only way to produce 2 $\gamma$'s through a $Z^0$ would be a higher order diagram, which would be enormously suppressed compared to the $Z^0$ coupling to a pair lepton-antilepton or quark-antiquark.