This is the kind of problems that are about the worst for diagnosing, because so many things can be going on and we don't really know much about what's happening under the hood.
That said, there are two components that are likely culprits when the system starts shutting down randomly, all temperature readings indicate nothing out of the ordinary and all fans (including the case fans) are working.
Random shutdowns can be the result of power supply problems. This is also relatively easy to check, and a fairly cheap fix (a simple power supply isn't that expensive). I suggest that you start out by confirming that all cable connections (both power and data) are secure; I would recommend that you unplug and firmly reseat them, one by one. If you can scrounge (or have) a spare, known good, PSU to test with, I would suggest installing that one and seeing if it helps. If it helps, then your problems are likely PSU-related, and you should just go out and buy a new PSU rated for the load your system puts on it. There are ATX power supply testers available relatively cheaply; especially if you have a high-end PSU, one such might not be a bad investment before you go out and buy a new PSU.
It could also possibly be the motherboard that is acting up. Unfortunately, they don't last forever, and I don't know a good way to actually test for this possibility. If that's the case, unfortunately you may be in the market for a new motherboard, which will likely also mean a new CPU and possibly RAM.