@alex The populating of the Markov Chain is creating a derived work, and I would say that making it generate gibberish from it does as well, though the opinions vary on this one and you need a judge decision in practice. Then, whether that is a copyright infringement depends on what you do with the gibberish. Copyright is all about publishing things. If you never publish it anywhere, you are fine.
I would say the ethics of this depend on what you do with it even more.