We constrain the redshift dependence of gas pressure bias $leftlangle b_{y} P_{mathrm{e}}rightrangle$ (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 fourth data release of the Kilo-Degree Survey (KiDS). The tSZ $y$ map and the CMB lensing map are from the {textit{Planck}} 2015 and 2018 data releases, respectively. The measurements are performed in five redshift bins with $zlesssim1$. 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 $bpe$ 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 {textit{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 the consistency of the two lensing signals despite their radically different redshift ranges. 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.