be sure to wipe your device before taking to a service business to replace the battery
Some devices have a "valet" mode. You activate it before bringing it in for service and it protects your data from being accessed.
yes, new Androids have it. I don't trust it yet
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/