I have never returned electronics to Costco before. How safe is it?
It us up to you to get rid of any personal data that you have put on the computer. At a minimum you should erase and reinstall the MacOS. Procedures vary depending the model you have. Costco will most likely sell it off to a wholesaler.
From Apple:
Back up your data. If you need help transferring data, schedule an appointment at an Apple Authorized Service Provider or an Apple Store at getsupport.apple.com. It is your sole responsibility to back up all existing data, software, and/or programs from your product. Apple is not responsible for loss, recovery, or compromise of data, software, or programs on your trade-in product.
Sign out of iCloud.
Turn off your firmware password.
Deauthorize your computer for content purchases.
Erase your hard disk.
Remove all accessories. If accessories are included in the return, they will recycled and cannot be returned to you.
Or, on the Mac:
Go to Settings->General->Transfer or Reset->Erase All Content and Settingsā¦