While you may think the issue is not a full drive (80%) there are other factors which are involved here with the timing of clean up and if the drive is using its over provisioned blocks. Don’t forget cache and paging can get quite large depending on what your app(s) is running and how big a work piece(s) you are working on concurrently.
Your symptoms line up with a SSD issue.
One of the issues with SSD’s is the way blocks of data are managed. As you use your drive data is thrown away (garbage collection). Here’s a good writeup on what happens Garbage Collection and TRIM in SSDs Explained – An SSD Primer. So when you have a very full drive (boot drive) you can get into a stalemate condition as the needed workspace is not available! And what you encountered here is likely this. The rule of thumb is you want to leave 1/4 of the drive free for the OS and Apps to use for their work space (cache & paging). In your case that would be 256 GB of space left unused as a minimum.
Now we also have a second issue here! When you get into this condition the spare blocks (Over-Provisioning) often need to be used as you’ve forced the OS & system to the extreme of reuse of the limited space and engaging wear leveling! This is not good as you can wear out the drive prematurely! Here’s a good write-up on Over-Provisioning: SSD Over-Provisioning And Its Benefits. Do keep in mind this is a Boot drive issue a data storage drive would not need to have this amount held in reserve. 1/8 is more than enough for a data drive or RAID set.
So what should you do with an SSD for a boot drive? While the rule of thumb is a good measure, you may really need more depending on what you are doing, in any case your work (data) should not be on the boot SSD at all! (here we are talking about a professional system not a lightweight home user) Very different use model.
- As an example: I have my Mac Pro (16 GB or RAM & 1 TB SSD) which only has the OS & Apps which I use on it on the internal SSD (my use is photo editing). All of my work is held on a TB2 external storage solution - 2 TB RAID SSD drive.
What to do to try to recover the drive: For starters clean off as much junk you can so the system is stable. Then make a full backup of your user accounts, apps & data. Then create a bootable external drive USB Thumb drive is the easiest following this guide: How to create a bootable macOS High Sierra installer drive
What we want to do is reformat the SSD and re-install the OS, then restore your user accounts & Apps back to your internal drive and then restore your data onto an external drive setup like how I have mine setup.
If the SSD won’t reformat or fails to get the OS installed you likely have over-worn your drive and will need to replace it.