First, we have used a large number of taxis over the years with no serious problems. Have found nearly all drivers are honest. But we do follow some simple procedures. We do prefer cash but will use a credit card especially if the fare will be large. So ---- first thing -- make sure the credit card reader is working and he will accept the cc. Make that very clear before getting in the taxi. I follow the route on google map to make sure we are not going in circle. Only a couple of times have we gone a little further than I thought we would but the driver had a decent excuse so I don't know. The probability of your cc being skimmed at a taxi is no greater than any other situation.
When paying in cash we count each bill slowly and careful. There are stories of a 20 euro note suddenly changing to a 10 euro note and your are short. I hand him a ten and say, "Ten ??" in an almost questioning tone. I generally round up just to avoid change. You might look at it and count. Again, we have never had any problems but we are careful, dumb, and slow.
As to cash vs credit. We tend be more cash than many in part because we started in 70s with cash and traveler checks. We tend to use cash below 50 euro oe ao. Big items like hotels, meals sometime, train tickets, etc. are charged. In nearly a years travel over the past 50 years we have never had any problems with credit card or pick pockets, etc. A hard NO and rapid walk away generally solves most problems. But some government training decades ago probably makes us a bit more aware of the surrounding situation.
Just relax, be a little cautious and you will be OK. No substitute for common sense. If it looks wrong -- it is.