"Upgrade information for older FortiOS versions (before 5.2.9) can be found here."
at the upgrade path page? If you click "here" you can see the tables starting from v2.50.10.
In the 5.x table, look for the row 5.0.7. You can find you can go up to 5.0.10. Then look for 5.0.10 row and find can go all the way 5.2.5.....
Then once you got above 5.2.9, you can use the regular tool. I recommend to go to 6.0.6, which fixed Fortinet Certificate revocation vulnerability.
You're right. I overlooked those 5.2 and 5.2.1 are ok to upgrade to. You can take that path too.
However, based on my experiences, I would go up to the highest in the major version first before jumping up to the next major version. So that you might be able to skip lower numbers of the new major version, like x.0, x.1, x.2, which most often have some kind of major config issues. I remember something was wrong with 5.2.0 and 5.2.1 and requires a boot drive flush to upgrade to higher. You can verify it when you download the release notes of 5.2.2 and check what kind of caution or special notes in there.