Some information about how those card reader / pin-pad devices work, that you see connected to cash registers in retail outlets:
The relevant sensitive information is communicated between the pin-pad itself, and the credit card processor company at the other end of the internet. The cash register itself, at least in modern ones, is just a passive messenger, passing blocks of encrypted data between the end-points at the pin-pad itself and the processor company.
When the software is installed and configured at the store, the processor sends some kind of encryption data (a public key, I suppose) to the store. The cash register gets this, and simply passes it on to the pin-pad. Thereafter, customers’ card data is encrypted there in the pin-pad itself, and the encrypted data is passed to the register, which then passes it on to the card processing company. The processor can then decrypt the data. At no point does the cash register have any access to any unencrypted sensitive data.
I think the card number itself is NOT sensitive encrypted data. For debit cards, the PIN is sensitive and encrypted. I don’t know that credit cards (lacking a PIN number) have any such protection. I can’t understand why credit cards haven’t always used PIN numbers just like debit cards, and I can’t understand why they aren’t all converting to use PIN numbers like debit cards.
The cash register itself could build a data file of all the card numbers (NOT including those extra 3 or 4 digits printed on the card), and this used to be a common thing for them to do. There are now some security standards that, among other things, forbid the cash register to collect or retain any such information. Modern cash register either do (or ought to) NOT keep this data.