I’ve paid with cash in many smaller shops and received handwritten receipts, one time after the receipt printer malfunctioned.
In addition, handling cash in foreign countries is a huge hassle bebause you oftwn spend quite a lot so then you feel like a moving target for robbers. I never felt more unsafe than when I was with Colombia with 1000$ in cash to pay a big transaction. I had cash in sweden only once in my life and it got stolen in a commuter train. Never again!
The problem with Sweden and SSN is not really cash but everything else (privacy, accessibility, discrimination, administrative hassle, online accounts...).
For tourists and Visa/MasterCard paying with a card is usually cheaper than withdrawing foreign cash at ATM.
With ATM you are slapped with a foreign withdrawal fee and you usually get worse exchange rate.
In general, the hierarchy of fees is no-fee CC < regular CC < ATM withdrawal < exchange cash at destination < exchange cash somewhere else.
It is also a bit similar for expats who, under certain conditions, can't apply for a Swedish person number (think SSN) and thus get a fully activated bank account. No bank account? Good luck doing anything!