Actually, Yosemite was/is a quite stable Mac OS. It of course will not "hurt" to upgrade to either El Capitan or Sierra (not sure how much "better" either of them are, or even how much "better" Sierra is than El Capitan), but if you do that, it would be prudent (and in some cases, necessary) to do the following:
1. Check of the compatibility of all your third party software and the OS you want to get to. This might require downloading some updates.
2. Do as much disk cleanup, maintenance, and repairs to your current "system". You can do a good amount of disk cleanup on your own, and there are some excellent programs available (both free and commercial) that can help you with that.
3. Next, make a backup to an external device. Time Machine is fine, but SuperDuper! or Carbon Copy Cloner is better (plus there are a couple of issues with using Time Machine which I'll mention below).
4. The next step is to boot your machine in an "isolated" manner. If you use Time Machine, the only way to that is to boot to the (hidden) Recovery HD partition. This link describes how to do that, and what you can do next:
https://support.apple.com/en-us/HT201314
The first thing you should do then is to select that 4th option, Disk Utility, and have it 1) verify (and if needed) repair your internal drive, and 2) Erase and Format it.
Once that is done, you would select the 2nd option, Reinstall macOS. Here is where you'll encounter "issues": First, I am unsure as to which Mac OS you'll get. Secondly, the installation will involve connecting to Apple's servers and performing the installation over the internet. Definitely not a speedy process.
5. If instead you choose to use either SuperDuper! or Carbon Copy Cloner in step 3 above, prior to that step, you would download the Mac OS you want from the App Store. What will happen is a file entitled "Install macOS El Capitan" or "Install macOS Sierra" will wind up inside your Applications folder. When that is complete,
make a copy of that file in another location.
After you do the backup with either SuperDuper! or Carbon Copy Cloner, it will be
bootable. You would then restart your Mac from that backup. run Disk Utility from there to do the steps I described above, find and launch the file "Install macOS El Capitan" or "Install macOS Sierra" to perform a fresh, clean, "virgin" installation of the OS onto your internal drive.
That procedure has the following advantages:
A. You have much more control.
B. It is definitely faster, as you will be doing everything "locally".
C. You know exactly which Mac OS you'll have at the end.
6. Finally, you'll be offered the opportunity, via Migration Assistant, to "migrate"/copy needed "stuff" from your backup.
As for having to pay for a program that can rescue your data, my perspective would be that no price is too small for recovering such important and critical information.