Wiping your device is still the primary method of protecting your data recommended by manufacturers, but the valet mode, or "repair mode" is a good second option to consider. Here's a good explanation of how repair mode works on Android: https://www.pocket-lint.com/what-is-google-pixel-repair-mode/