I built Telegram-Archive because I wanted complete control over my chat history, no matter what might happen (i.e. my account gets locked, or Telegram changes policies, etc.)
It's composed of a backup and a viewer. It has been evolving for some time and it's more complex than that, so you can, for example, archive and share public channels.
Feel free to check the features. I think the project is still in its infancy, but I hope you can bring your expertise and suggestions too.
Built with Python, FastAPI, Telethon, and Vue. GPLv3 licensed.