How do I make sure I get strong recommendation letters for faculty positions?
One way to solve this problem would be for me to ask Prof. X if he is sufficiently familiar with my work to write me a strong letter. 


No.  Do not play mind games.  The best approach is to be completely straightforward.

If you already know that he is familiar with your work, suggesting otherwise is dishonest and potentially insulting.  What you really want to know is whether he's impressed by your work.  The only way to find out is to ask directly.  If possible, ask in person, preferably over coffee/beer or in some other informal neutral setting; conferences are really good for this.  Be straightforward about your desire for a strong letter, but use the opportunity to develop a stronger collaborative relationship.  Ask for honest feedback on your work.  Ask about future opportunities to work together.  Ask where he thinks you should apply.  Be sincere in asking whether he can write you a strong recommendation letter; he knows what that means.  Be sincerely ready to be turned down.  Listen.

If you're not comfortable asking him directly, or you think that he might not be comfortable answering you, ask your advisor to informally sound out Prof X's opinion of you first.  (Ideally, your advisor already has some idea what Prof X will say.)  But the actual letter request must come directly from you.


  If he only responds neutrally, e.g., "Sure, I can write you a letter" then simply neglect to follow up with him and ask someone else for the letter.


No.  Do not play mind games.

First, unless you already know Prof X extremely well, you should not attempt to read his mind through email.  "Sure, I can write you a letter" says nothing about his level of enthusiasm.  If his response to your request makes you hesitant to use his letter, ask him again.  Second, if you decide, for whatever reason, that you don't need his letter after you've asked for it, you must tell him directly, so that he doesn't waste his time.