Is there some rule of where the origin should be placed on a mesh when exporting to FBX for use in a game engine, should it be placed anywhere specifically?
In my experience I have found prefered origin placement. Dependant on desired result and/or alignment on a per-piece basis. However as a basic default it's best to place the origin centered at the bottom. It's also good practice to keep the bottom aligned to 0 on your vertical axis.
I am unsure about the Unreal Engine. But in Unity the Y axis is used for vertical instead of Z. As such in order to import properly I have found the mesh needs to be oriented with -Y as bottom & +Y as top.
Also, likely most importantly, be sure to apply Rotation & Scale. ( Ctrl + A )