Both CarPlay and Android Auto just 'mirror' data and apps from your phone. The only thing car play saves is a small unique identifier for your phone. (and there is nothing to gain from that.. but you can 'reset' the system and it will remove all uid's)
However... The built-in manufactures Navigation and 'infotainment' will have the old owner's data (travel history, address, contacts, music playlists.. etc). There should be a way to clear/reset that.. just look in the manual.