You can't. Pitch it and start over.
Microsoft Teams is a mess. It tries to do too many things and does most of them badly. The chat function is an an inexcusable mess - news flash no one needs to have every friggin' chat they ever had cluttering up the UI. And the UI is an exercise in bad design - its confusing and takes up way too much space. The file storage is impossible - if you put a document in a channel's file space heaven help you if you need to find it to edit it or lock it down. And many people have complained about the performance issues and memory hogging.
I really do not see any way to fix the many, many problems in MS Teams. The issues seem to be as much in planning and development as in code. I strongly recommend that Microsoft chalk this up as a learning experience and focus on developing something new that is actually functional. And hire some UI and UX specialists and work with your alpha and beta testers to avoid basic problems. And stop trying to do everything in a single product. If you want a good communication tool, develop a good communications tool. If you want to do file sharing, develop a file-sharing app. Or better yet - figure out what you are good at and let other companies do what they are good at. Wasting resources trying to do what some other company is doing is pointless, unless you really think you can do it better and (this is the important part) are willing to commit to doing better. **** like Teams and Windows 8 just damages your brand.