Does banning used books actually stop any of the communication between gang members? Do we have any idea how often books are used to incite violence versus how often they are just read? What percentage of prison violence comes from book encoding versus other means?
These seem questions you would have to answer before coming to the conclusion that banning books is the right answer here. "a lot of the people in prison are some seriously bad dudes" seems to imply that we can justify mistreatment of millions of Americans.
If there are problems with prison violence we should address those rather than just limiting access to books.