It's perfectly fine to install a JHF on a gateway before the Management. There is no dependency, unless one is specifically stated for using a specific feature.
Often, customers might install a JHF on a specific gateway to resolve some issue, and it's not mandatory to install that JHF on the Management.
We do recommend to install JHFs regularly on the Management to get periodic important fixes, but that's unrelated to the JHF on the gateway.
The below post is from a while back, but explains things pretty well:
https://community.checkpoint.com/t5/Management/Management-JHF-Did-You-Know/m-p/56880