Stable compression of a spherical tokamak plasma