XDA thread: Telegram: Backup: 1. All apps. 2. All app data. 3. All app permissions. 4. SMS messages. 5. Call logs. 6. Contacts. 7. Screen DPI. 8. Default keyboard option. 9. ADB state. 10. Font scale. 11. App installer. And restore in your new ROM in a unique way. First backup everything. Then flash your new ROM. Now flash the backup zip file
Download the installation package of Migrate for free and take a look at users' reviews on Droid Informer. This download is completely safe. BaltiApps is the creator of the app which is included in the Productivity category.