Computer freezing under strange circumstances

My computer is doing something very strange.
It freezes up randomly, I know it is not a software problem because it even freezes during new windows installation after formatting hd.

Here’s the catch: Sent it to a technician twice, both times resulting in no freezing after days of testing…

It only seems to freeze at my apartment, can’t even go 5 minutes without it freezing. Did run it on a UPS still resulting in a freeze, so I’m assuming it is not a power problem

Anyone familiar with such an issue?
Any advice?

Thanks in advance

Thanks for the advice, but I have checked cpu temps which checks out just fine.
This might sound like a crackpot theory: Ever heard of a keyboard and/or mouse causing a freeze?
It is the only thing i haven’t tested. Alternatively, could a faulty usb/ps2 port be causing the problem?

Thanks again