Unfortunately, the answer to your question is a resounding no. However, there is a way to achieve this by utilizing a tool known as a Configuration profile
. It's worth noting that Configuration profiles are intended for enterprise use only.
Enterprises have the ability to configure and manage devices on a large scale using mobile device management (MDM) tools. Through MDM, organizations can send specific commands to devices with the necessary profiles.
One such command is Lock a Device
, as described by Apple:
This command allows you to display a message and contact information on the Lock screen under certain conditions. This feature works if the user has set a passcode on the device, it's not a shared iPad, and it's not in Lost Mode. In macOS, locking a device utilizes the Find My framework and will fail if there is no recovery partition present.
In summary, while regular users may not have access to this functionality, administrators overseeing enrolled devices do have the capability to perform similar actions.