For longevity, the links must go through a website I control. (It's no good building redirects using company XYZ's links going through their URLs if they go out of business and my links die.)
Due to some vendors' terms of service (Amazon, for example), some redirects will need to go to web pages on my site where a reader clicks something before they are taken to the destination URL. Other redirects should go straight to the destination. Cloaking may be useful for some affiliate links.
I also want tracking and stats, so I can gauge link traffic and see what is/isn't working. (Also, how my link click stats compare to what merchants/networks report.)
I currently use self-hosted WordPress sites. I'm moderately technically savvy and know how to hand-code HTML.
What software features should I look for? What software do you recommend?
What are best practices using redirects this way, and what should I avoid?