The documented upgrade paths basically only reflect which paths have been explicitly tested and verified. It makes sense for Alfresco to only test / verify upgrades from the last / most recent / next version to go out of full support when a new version is released, which is why they only tested from 5.2 to 7.0, but not 5.1 to 7.0, because 5.1 was already out of support for quite a while, and 5.2 was the most recent version to be deprecated at the time 7.0 came out. It can technically work to upgrade from 5.1 to 7.0, but you'd have to test / try it on your own risk.
The general rule (for Enterprise) also has always been to first upgrade to the latest version in a specific release (e.g. the latest service pack) before doing an upgrade to a higher major/minor version, as these service packs could include important fixes that later versions with their upgrade logic might rely on.
Also, the latest version does not include all patches. Alfresco has been known to disable / remove some intermediary patches (e.g. for upgrades between 5.x and 5.x+1) in the major release after next (which would be 7.0), for the purpose of reducing support and maintenance costs. It is also for that reason, that straight upgrades are generally only officially supported from 5.2 to 7.0, because in that case, you are not in danger of potentially missing out on fixes from those intermediary patches.
You can upgrade to 5.2 or 6.2 first - your choice really, as long as you ensure that you had the chance to run any intermediary patches relevant for a current 5.1 install.
If you have custom models in your plugins / modules, then you must ensure that those models are available and registered with Alfresco for the purpose of an upgrade using the intermediate version WAR, otherwise some patches may run into issues when dealing with nodes of affected types, aspect, or with affected properties, associations. You typically do not have to have a fully-fledged configuration, or full installation of all modules.