Well have 2, 3 servers with a lot of work with many members and I think that maybe discord had a feature for saving locally a json or xml..
not within Discord.
The DiscordApi is very powerful and there are implementations in any kind of languages.
.net, JavaScript, Java. My wrap is a wrap for the java implementation of JDA (JavaDiscordApi). I use the wrap in all my DiscordBots. All of them are written in B4J.
Regarding saving data again:
But if you have a Bot with the right permissions and have the Exclusive intents active then you can get every message posted.
With use of the Api you also can get older messages from a channel.
You need to implemented all this in a DiscordBot though.
Or have a look at the HTTP RestApi Discordprovides. You probably can get a messagehistory here too. I´m not sure about though as i only use JDA