Ariel stellar characterisation. I. Homogeneous stellar parameters of 187 FGK planet host stars: Description and validation of the method