Use an automatically generated password instead and only store them in secure locations like Keychain Access or iCloud Keychain. Here are some of the measures you may take to control Mac remotely without compromising your system and data safety:
Use the bullet list to specify if you want to allow remote access for all users in your local network or only the specific ones.Tick the box next to the Remote Login service to turn it on, then tick the “Allow full disk access for remote users” checkbox, if needed.In the sidebar, click General, then scroll down to find Sharing.