Credit cards are ok for the long distance trains run by the DB or
regional trains, just not for local transportation.
I wonder if that is because the fares for local trains are too low. I know a hardware store near me won't take credit cards for purchases less than a certain amount.
According to this MVV webpage, touch-screen automats in U-Bahn stations. which are run by MVV, ** take ***credit cards, touch screen automats in S-Bahn stations, which are run by the Bahn, don't. The same page says that automats in the S-Bahn stations take *debit cards** with PINs, but the German language version of the same page seems to imply that they only take a specific brand of debit card (Girocard, maybe Geldkarte) issued in Germany.
Since you will be taking the U6 to Thalkirchen, you'll be using the U-Bahn station at Marienplatz, not the S-Bahn station, so the automat in that station, according to the MVV, should take credit cards. Still, the ticket is such a small amount, I'd pay cash.
Ironically, a few years ago I arrived at a station for a short local trip before the ticket counter was open. I wanted to pay cash and had plenty, but the only ticket machine in the station was a Bahn automat. At the time, Bahn automats only took credit cards, not cash. I had to charge $3 on my credit card.