How to protect the AC from power spikes - a hardwired surge protector, or UPS?
They are intended for different purposes:

Surge protectors are mostly designed to protect against lightning strikes, although more expensive models may include some kind of power conditioning (protecting against smaller surges).  

A UPS, (Uninterruptible Power Supply), on the other hand, is designed to provide some amount of power to a computer during a power outage, helping to prevent data loss, etc.  These also usually include a surge protector and power conditioning, of various qualities.

Motors, compressors, etc. generally draw a large amount of power on startup, unlike computers, which may cause problems.  You probably also do not need your devices to keep running for a short amount of time during a power outage (if you do, a UPS would be the way to go).  

Whatever you do choose, make sure that it is rated for the power and voltage being used, and that it is intended to be used in that manner.  

As ThreePhaseEel stated above (beat me to it, it seems), a hardwired surge suppressor is probably your best bet.