If you have control of the entire IRC stack (the daemon, the bouncers, etc) you can work around a lot of those issues.. though at that rate, it's probably a lot less work to just host something like Riot..
IRCd - real time, ram buffering of messages. Quassel - reads and stores buffers in a database, allows users to retrieve them.