Is it possible to enable the functionality of storing the history of messages on the server?
And according to it - loading this history to client?
Maybe some plugins?
In theory this should be possible as Monitoring Service plugin should already has support for MAM (XEP-0313: Message Archive Management). But you also need a client supporting this XEP. Spark doesn't yet. I haven't tried it with other clients.