I have never seen a situation like this before, but I'll try my best. Maybe someone who's seen something similar will have better input.
- I think you should use Interfolio (a letter-collecting service) to go ahead and request the letters now if you won't be able to see them for the next four, five years. This is one option.
- If you don't want to collect the letters now, you can maintain a relationship with the professor. Tbh, that sounds very excessive, but it is a thought. Send them a Christmas cards (loooool) and email updates. Maybe you'll become close friends! Visit them in their office hours (if at all possible).
- Being absolutely realistic (life happens), if you aren't able to contact them in four years, they won't be able to update your letter. If you don't get the letter now, you might want to find new letter writers. Four years is a long time! We all change, so a new letter-writer will have better input about you.
To be honest, I really like the idea of getting the letters now and maintaining the relationship (with minimal email updates). Store them on interfolio. Go ahead and look for new letters from new people when the time comes.
At the very least, you will have a letter from them stored away. Ask them to update the letter (date and the like), when the time comes. Good luck OP! Maybe someone has a better idea.