Hello obscurelines,
Welcome to PCHF.
Random crashes are normally caused by overheating. Check your external fan at the back of the PC to make sure it is not clogged with dust, as well as and especially your internal
CPU fan. This means opening opening your PC case, normally held together by 4 or 6 screws at the back with older PC's. You will find your
CPU fan in the centre of the case.
Fragmentation is not normally the cause of a PC to crash. To resolve the error message you get when defragmenting, you need to first run a scandisk to resolve any errors on the disk first. You will find this in the same section as Defragmentation called "Error Checking".