Check with your own tax advisor. As a general rule, IIRC Accounting 101, if the membership was exclusively so you could do shops at Costco, then it would be deductible. But you'd better be able to prove it beyond any doubt. Go ahead and get the membership and save the few cents on gas and don't worry about the rest.
You can enter Costco without a membership [ditto any of the warehouse clubs] if you say you are going to the pharmacy. At Costco, buy something at the snack bar because there you don't need to show your membership card, and the receipt gives you the POV.
.
Have PV-500 & willing to travel.
"Answers are easy. It's asking the right questions which is hard." (The Fourth Doctor, The Face of Evil, 1977)
"Somedays you're the pigeon, somedays you're the statue.” J. Andrew Taylor
"I have never met a man so ignorant that I couldn't learn something from him." Galileo Galilei