Should I contact potential recommendation letter writers if I only have vague plans about applying for a PhD?
This is easier if you can have a face to face meeting. Tell them you are considering it and ask for their advice, and especially about your likely success. If they seem supportive, you can say that you aren't quite ready but would probably want a letter from them in the future. 

For a supportive prof they would possibly make a few notes to themselves about what to say before they forget your face and accomplishments. Professors see a lot of people and some things start to run together after a while. But after the heads-up they are, perhaps, more prepared to write a supportive letter. 

But it is much less effective if you have to do this by email or such. 

And if they seem discouraging, then there is probably no need to ask, thought they may still have valuable advice about how to prepare yourself. 

I've had to ask students, looking for recommendations, to remind me of a few of our previous interactions if it has been a few years since we last spoke.