Hi. My name is*****'m looking at your question now and will post my answer or ask for more information here in a short while.
The statutory residence test was introduced on 6 April 2013 to make the determination of an individual's tax residence status easier to ascertain as there are a series of tests which apply to everybody. The SRT can be found here.
If you are not automatically non-UK resident or automatically UK resident, then you have to consider the number of defined ties that you have to the UK and that will dictate the number of days that you can spend in the UK in any one tax year. Take a look at the flowchart here and the notes here. If you have one tie to the UK, you can spend no more than 120 days in the UK in a tax year in order to avoid paying UK tax on your Dubai earnings. Certainly, if you spend 183 days in the UK in a tax year, you will be UK tax resident and taxable on your worldwide income.
I hope this helps but let me know if you have any further questions.
If you did become tax resident in the UK and continued to work in Dubai, that status would not affect your earnings for the tax years prior to the one in which you became UK tax resident again.
Your conclusion is correct. You don't need to tell HMRC anything unless you do become UK tax resident. You just need to manage your time so that you don't breach your UK days limit.