The little box on the side of the compressor is (more than likely) a relay (sometimes called a contactor). While your compressor probably has a cap, it’s probably inside and not replaceable (because you have a sealed system). The relay, however, is, and it’s pretty easy. OTOH, testing to see if it’s the culprit is going to take you down the same path as testing to see if the defrost timer is bad. Test for power at the compressor. If you don’t have power there, you move back to the next thing. If you do, it’s something going on with the compressor and you can look into the relay. Often, it’s as simple as removing the cover and pushing the relay closed with something non-conductive.
As for testing the timer, based on a (random) diagram I found: White=common, Blue=Hot, Yellow=Defrost heaters, Orange=Compressor.
Based on that:
Compressor running normally:110v White to Blue; 110v White to Orange
Defrost mode, 110v White to Blue, 110v White to Yellow.
Now, when it’s not working and hasn’t been for hours and hours you need to check a few things:
White to Blue, 110 means the timer is getting power.
110 on White to Yellow means it’s stuck in defrost (most likely, could be something else and it just happens to be in defrost right now, you can always recheck in half hour or so)
110 on White to Orange means the timer is telling the compressor to turn on, but the compressor won’t.
As for the t-stat, I need to see if I can dig up a diagram. It could come before or after the the timer, but my guess would be before. IME, in residential units, the timer is the last thing before the compressor.
Again, you really need to wait until it’s not working and check the to see if the compressor is getting power and check to see if the timer is sending power. That’s probably going to tell you what’s going on, or at least point you in the right direction.
One last thing, now that I think about it. I’m going to guess that the timer sends power directly to the compressor and the t-stat flips the relay on and off. That’s the ‘clicking’ you hear when you move it back and forth.
ETA, we can test the t-stat, but I’m guessing it’s not going to be the problem.