Yes, you are right. If the taxpayer already has salary/other income of £20k he will pay no more on the dividend of £5k.
And, yes, the company has already paid tax on 20% of its profits. So to get £5k in dividends, the company would have had to have profits of £6,250.
So the individual is in the same position whether he hold the property individually or the company holds the property.