iMac 12,2 - Likely hardware problem: How to properly diagnose? The problem:

All applications that are launched on the iMac take a very long time to start. E.g. on a clean startup Word takes about 40 seconds to fully start, Adobe Reader about double. The same problem also happens when starting things like the settings menu. 

Starting multiple applications simultaneously often leads to a complete stall. 

Once an application is (or multiple applications are) running there isn't really a noticeable lack of performance anymore.

Steps taken so far:


Fully updated macOS via AppStore as well as all relevant 3rd party software. Also cleared ~/Library/Caches and many cache related folders of individual applications.
Ran a check of the HD via Disk Utility, it did not find anything wrong. 
Ran ps aux in Terminal to see if any application or process is slowing things down. Yet I did not find any particular program, the highest CPU and MEM usage mostly coming from Terminal itself and not surpassing 5%.
Ran a full check of the system integrity via OnyX (Maintenance Tab - first checkbox). It did not report any problem. 
Ran EtreCheck 3 times to see if any clear problem would present itself. No major issues where found. Three minor issues appeared:
Upgradeable RAM - (the iMac runs on 4GB, 1333Mhz)   
Unsigned files - Which resolved to launch agents of Adobe, Skype, etc.   
Low performance – EtreCheck report took over 5 minutes to run. This is unusual. - NB: Problem only appeared once in three runs of EtreCheck.

The full EtreCheck report can be found here.
Ran Apple Hardware Test (by pressing D during startup). It showed an error: 4SNS/1/40000000:TH00-9.000 which led to this possible cause / answer. Basically it boils down to problems with newly installed HD's that do not have a circuitry for fan sensors integrated into the drives.


Current gut-feeling:

The low-ram mentioned by EtreCheck might be part of the problem, but I would find it strange if a 4GB RAM would cause such a slow iMac, especially when ps aux isn't reporting any real activity most of the time. Also, I would not understand why the problem occurs mostly during the launch of applications while not slowing them down once they are up and running. 

The problem found by Apple Hardware Test resolves to a problem with the temperature-regulation of off-the-shelf HD's. The iMac did indeed receive a new HD at one point in its life, it was installed by a professional computer store (though not Apple). So my gut feeling is that maybe this is what is slowing it down. This answer would strengthen that believe, yet it doesn't really explain why it would cause the problems that I am experiencing. 

Questions left unanswered:


Apple Hardware Test stops after it detects the error mentioned above; is there anyway I can force it to continue its test to see if there might be anymore errors?
Could a fully functioning hard-disk cause the problems as described simply by badly communicating fan-sensors?
What else could I do personally to further diagnose the exact problem?
Although your times seem too long, this could be due to your HDD. You said it was replaced, any idea on the specs?  A slow drive can be indicated by the problem you describe. Loading an app may be very slow since it is being read off the HDD. Once loaded the speed will be determined by your RAM unless you output a lot of data to disk.