Using head–tail galaxies to constrain the intracluster magnetic field: an in-depth study of PKS J0334−3900