Having tried several of these solutions, I have some notes:
DoubleCommand will not allow you to swap esc and caps-lock.
PCKeyboardHack will allow you to map capslock to escape, but does not have the capability to map escape to capslock. Recent versions will allow you to perform a complete swap by editing both keys.
This may or may not be sufficient for your needs (I know it is for mine).