To and encrypted message and stored on the server — such ready decisions I do not know. But you can do it yourself, the idea — in your jabber server, configure the history storage on the server.
To exchange encrypted at the client level messaging can take advantage of the PGP. Or here is even easier — technology OTP, which works out of the box in Adium (Mac) and after installing the plugin in Pidgin. In this case, the keys you generate for yourself, the server cannot decrypt the messages.