Hi Brian,
Although not specifically stated in 680.41, the distance can be measured as stated in 680.22(A)(6). The distance to be measured is the shortest path without piercing the permanent barrier, which in your installation is the fence. While the fence could add the additional distance needed to put the emergency shutoff more than five feet from the spa, it could violate 680.41 in other ways. The shutoff must be within sight of the spa . . . if the fence is too tall, the shutoff would not be within sight. The shutoff must be readily accessible to users . . . if users must go around the fence or open a gate, the shutoff may not be considered readily accessible.
This requirement only applies if the occupancy is anything other than a single-family dwelling.
Charles