Most of today phones are encrypted by default, so use a pin which is difficult to guess / generate and reset it.
For SSD, use encryption softwares like veracrypt to encrypt [ Use password larger than 20 characters ] reset the partition, This solves most of the cases. If needed you can use...