Keep in mind a person buying the laptop may even attempt to repair the Logic Board in which case they would be able to easily access the data.
Did you have Filevault enabled on the SSD? If so, then the data on the SSD is encrypted and is as safe as the password(s) you used for each user account on the laptop. If you used a weak password, then anyone with physical access to the laptop may be able to unlock it.
Can you put the broken laptop into Target Disk Mode? If so, try connecting it to another computer so you can attempt to erase the SSD. A laptop may work perfectly fine in Target Disk Mode even when it is unable to boot, but it depends on the failure since at least one USB-C port must be functional. If the SSD itself has failed, then there may be nothing you can do to secure the drive and data short of destroying the chips on the board which may even require completely removing the Logic Board to access all the memory chips (this is an involved process and would further decrease the value of the laptop as you will likely damage one of the many fragile cables/connectors rendering those parts unusable to a repair shop or refurbisher (even many recyclers since they want to try to refurbish & resell equipment since there is more money in it than melting it down).
Another option would be to ask an Apple Authorized Service Provider if they would be willing to use their Apple black box to connect directly to the lifeboat connector on the Logic Board (assuming a Touchbar model) in order to attempt to directly access the SSD to erase it for you. As long as the SSD itself if still functional this should work. If you happen to have the non-Touchbar model, then you can just remove the SSD (I'm not aware of any adapter so you could erase the SSD or to re-use the SSD so you would need to have another similar model or physically destroy the SSD).
You can also locate a recycling center that actually securely erases drives if possible or physically destroys them if a drive is non-functional. Of course you are putting your trust and your personal data in their hands hoping they do as they advertise.