Wicking polyester is cheap and out-wicks just about everything, just a shame it can turn smelly very quickly. Some polyester shirts have special treatments claimed to reduce the smelliness, but that makes them expensive - these polyesters are typically given proprietary names, e.g. "Capilene".
The magic with wool is more to do with it being able to insulate even when wet, and not turn smelly, with moderate wicking performance. As it still feels warm even when moist, it probably doesn't need to wick that well. Wool you can wear next to the skin (without itching) is expensive.
Polyester is also more convenient to wash (doesn't shrink or go out of shape) and dries quicker than wool.
Cotton absorbs moisture and holds onto it giving a cold, clammy feel, which is not the same as wicking; IMO it is unsuitable as a base layer.