Not all of the functionalities that you’ve mentioned are possible. The first (messages should be deleted automatically) and the third (Creating a code to enter a chat) are possible. However, these, too, require complete customization codes or Chat APIs that you’re going to use.
The third functionality is not possible as it relates to the app’s guidelines and other security concerns.