  We constrain the redshift dependence of gas pressure bias $\left\langle b_{y}
P_{\mathrm{e}}\right\rangle$ (bias-weighted average electron pressure), which
characterises the thermodynamics of intergalactic gas, through a combination of
cross-correlations between galaxy positions and the thermal Sunyaev-Zeldovich
(tSZ) effect, as well as galaxy positions and the gravitational lensing of the
cosmic microwave background (CMB). The galaxy sample is from the 4th data
release of the Kilo-Degree Survey (KiDS). The tSZ $y$ map and the CMB lensing
map are from the Planck 2015 and 2018 data releases, respectively. The
measurements are performed in five redshift bins with $z\lesssim1$. With these
measurements, combining galaxy-tSZ and galaxy-CMB lensing cross-correlations
allows us to break the degeneracy between galaxy bias and gas pressure bias,
and hence constrain them simultaneously. In all redshift bins, the best-fit
values of $\left\langle b_{y} P_{\mathrm{e}}\right\rangle$ are at a level of
$\sim 0.3\, \mathrm{meV/cm^3}$ and increase slightly with redshift. The galaxy
bias is consistent with unity in all the redshift bins. Our results are not
sensitive to the non-linear details of the cross-correlation, which are
smoothed out by the Planck beam. Our measurements are in agreement with
previous measurements as well as with theoretical predictions. We also show
that our conclusions are not changed when CMB lensing is replaced by galaxy
lensing, which shows consistency of the two lensing signals despite their
radically different redshift range. This study demonstrates the feasibility of
using CMB lensing to calibrate the galaxy distribution such that the galaxy
distribution can be used as a mass proxy without relying on the precise
knowledge of the matter distribution.
