Decoupling of heavy quarks at four loops and effective Higgs-fermion coupling