The nonabelian Fourier transform for elliptic unipotent representations of exceptional $p$-adic groups