Here are some numbers.
Right now Roger is 155 points behind Rafa. He can reach #1 by:
A) Playing and reaching the SF of Rotterdam (win three matches) and/or
B) Winning 99 fewer or more points at Dubai/Acapulco (when those points come off, Roger will actually be 100 points ahead of Rafa).
Roger will probably get back to #1 after Dubai/Acapulco unless Rafa wins Acapulco and Roger doesn't win Dubai, or Roger goes out early and Rafa reaches the SF or later. In other words: #1 is on Roger's racket, at least for a week.
Once we get to the Sunshine Double, Rafa will probably take the #1 back because he has 690 points to defend vs. Roger's 2000. So going into clay season, Rafa will probably be #1.
At that point Roger has a very good chance of regaining #1 even if he doesn't do anything during clay season AND Rafa doesn't repeat his 2017 results. Rafa has 4180 clay points to defend, while Roger has 0. Actually, taking off all points through clay season - including Sunshine Double - and Roger has +3470 points going into grass season. Now if Roger were to, say, play a clay Masters and Roland Garros and pick up even 500+ points, his chances of holding onto #1 increase substantially.
If he's #1 going into clay season, it is hard imagining Rafa catching him and Roger really could be year-end #1, unless Novak or someone else (Cilic?) comes on strong.
THE BOTTOM LINE: Roger not only has a very good chance of taking #1 for a week after Dubai/Acapulco, but regaining it sometime in clay season and potentially holding onto it for awhile.