ESPs fall into many categories but broadly there is the exempt employee scheme and the rest.
The general ESS rule allows a employee to receive up to $1k of shares tax free in a year. Its exempt for tax. The cost base is that value up to $1k. When they are sold etc then usual CGT rules apply. The usual limiting issue to these arrangements is that they are broadly offered to ALL staff and not just execs etc. Some example = Woolworths, Wesfarmers etc.
The rest can include some very sophisticated valuation issues and trigger events. Vesting issues and a range of tax treatments depending on when they rights etc were issued. Different tax rules apply to shares, options, rights etc. Some ESPs come with ATO rulings at the time of issue and others don't.
The Swan changes of 2009 largely canned the ability to defer the taxing point on shares granted at discount. The discount is assessed on issue. Some employers combine this with loans etc. Then usual CGT rules follow. There can be some catches especially options. That why they are out of favour. The option can trigger tax and not on capital account. ie no 50% discount. Rights issued before 2009 still have the old rules applied.
Personal tax advice is always essential with these. I have seen some horrid tax bills on default assessments with penalties + interest. I have also seen some clever schemes too...One of the best was Packer. He employed some very clever tax people and they were well ahead of the game.
One issue to watch too is earn out rules....eg shares based on a future value. The taxing point "today" can apply the worst case value and then in years time an amendment may be needed if that value isn't paid.