  In 2022 the BL Lac object S4 0954+65 underwent a major variability phase,
reaching its historical maximum brightness in the optical and $\gamma$-ray
bands. We present optical photometric and polarimetric data acquired by the
Whole Earth Blazar Telescope (WEBT) Collaboration from 2022 April 6 to July 6.
Many episodes of unprecedented fast variability were detected, implying an
upper limit to the size of the emitting region as low as $10^{-4}$ parsec. The
WEBT data show rapid variability in both the degree and angle of polarization.
We analyse different models to explain the polarization behaviour in the
framework of a twisting jet model, which assumes that the long-term trend of
the flux is produced by variations in the emitting region viewing angle. All
the models can reproduce the average trend of the polarization degree, and can
account for its general anticorrelation with the flux, but the dispersion of
the data requires the presence of intrinsic mechanisms, such as turbulence,
shocks, or magnetic reconnection. The WEBT optical data are compared to
$\gamma$-ray data from the Fermi satellite. These are analysed with both fixed
and adaptive binning procedures. We show that the strong correlation between
optical and $\gamma$-ray data without measurable delay assumes different slopes
in faint and high brightness states, and this is compatible with a scenario
where in faint states we mainly see the imprint of the geometrical effects,
while in bright states the synchrotron self-Compton process dominates.
