Then that is your most likely source of the problem. Please defrag and see if it starts working again.
I use IoBit Advanced System Care 7 and Smart Defrag 3. It is free and is pretty effective.
And unless you're careful, they try to install extra junk and mess with your browser. When you install either of these, make sure you pick "Custom" - do
not let them run an "Express" install. Then you at least get to see what else they're trying to do to your computer and you have the chance to stop them from doing it. Advanced System Care also tries to persuade you to buy the commercial version when you run it.
I installed both of them on my home PC. Despite letting Advanced System Care do its stuff whenever it nags me, which is about every couple of days, there's no noticable improvement in performance. Mind you, that PC is running pretty well anyway, despite Advanced System Care's warnings. My work PC, on the other hand, is running slowly, so I installed both programs there too. The most visible result was that the privacy sweep fouled up the PC's ability to log onto the network. Advanced System Care will not get a second chance to do that!
As for running PoTC for longer than a couple of hours: sometimes when you're in a big sea battle, you don't have much of a choice in the matter because you can't save game at sea. This is one reason why I don't use DirectSail, preferring instead to travel between islands on the worldmap. You
can save there, just before you go into a battle, then if the game crashes you haven't lost all your progress.
After installing the game, I edit the various configuration files, run the game just long enough to get the controls set up, then when everything is the way I want it, I copy the whole game directory to a backup directory. If the game then starts misbehaving and it can't be cured by loading an earlier saved game, I delete the game directory (except the "SAVE" directory), then copy everything from the backup directory (except the "SAVE" directory). It's a lot quicker than a total re-install and means I don't need to edit the configuration files all over again.
If I do need to reinstall (e.g. when an updated version is released) then I first delete the existing installation, install the basic game from CD's, then install the new version on top of that. This way there is no chance of anything dodgy being left in place from the previous installation.