My layman's understanding: If you permanently mount the spa panel, it would be subject to code, and you would not be conforming to code if you were to bond neutral to ground in the spa panel as depicted in the 3-4 wiring diagram. So, that configuration is not ideal, relative to running 4 wires from your main panel, and using 4-4 wiring in the spa panel to use the GFCI.
That said, the 3-4 wiring is safe (as safe as your dryer or range that is configured the same way), and if you make the spa panel a pluggable device (no changes to your house wiring), then it is not subject to code.
Bottom line: If you can, run H-H-N-G from your main panel. If you cannot, and you can run a separate ground to your spa panel, then do it. If neither of approaches are practical (you rent, not in the budget, etc.), then the 3-4 spa panel configuration is a workable solution.