You can use a bootable Parted Magic USB drive which is just a Linux utility disk with a customized app which makes it easy to access the SSD's built-in hardware secure erase feature. The last free version of Parted Magic is available from the MajorGeeks' link here. If the free version doesn't boot your Mac, then you will need to get the current paid version or use Linux if you are familiar with Linux. You can use the downloaded .iso file as a source for Etcher (Mac/Windows/Linux) which can "burn" the .iso file to USB.
Option Boot the Parted Magic USB drive and select the orange icon labeled "EFI". There should be an icon on the Parted Magic desktop for erasing drives. Within this app there are several different methods to erase a drive, but only one of them will utilize the built-in hardware feature which will reset the SSD to factory defaults. You want to select the "ATA Secure Erase" option which will prompt you to sleep & wake the computer as well as prompt you to create a temporary password. Keep this temporary password simple like "abc" since it is only used to activate the hardware feature. If the secure erase fails or is interrupted for any reason you will need to use this password to disable the ATA security feature or the SSD will permanently locked and unusable. The ATA Secure Erase can take anywhere from 30 seconds to 15 minutes to complete. Make sure a laptop is plugged into the charger.
Here is a Parted Magic article with details for the ATA Secure Erase for the current paid version of Parted Magic. While the look of the old app is different the procedure is basically the same.
https://partedmagic.com/secure-erase/
Keep in mind not all Apple SSDs have this built-in hardware feature. This will also only work on 2015 and earlier Apple computers & SSDs.