You may be able to do it with temporary solutions
Disable chat on Microsoft Teams
Did you know that all chat history in Teams is recorded? Not only in the workplace, but also in the personal version. But can you turn off or disable chat history in Microsoft Teams? And if so, how can you turn off or re-enable chat history in Teams?
The short answer is that you may be able to disable Microsoft Teams chat history with a temporary workaround, and you may also be able to delete your chat history.
All one-on-one chats in Microsoft 365 for business are retained in a hidden folder in your Outlook mailbox for eDiscovery, regulatory compliance, or training purposes. The default retention policy for Teams chat conversations is forever. However, you can change this by creating a new retention policy. To configure a retention policy, you must be the global admin for your organization or have the permissions assigned to you by the global admin.