I remember in high school physics realizing that an in-elastic rod would not be possible, because it would allow faster than light communication. There’s probably something to that effect that already exists that I don’t know about regarding information theory, and how you can’t store more information than is allowed by converting the problem into one of measurement rather than compression.
It might even say something about how small matter is allowed to be.
If you increase the number of sticks the alien is allowed to have, then his task becomes significantly easier. So the question could be rephrased as “what are the fewest sticks the alien could use to complete his task of encoding n bits representing m books”.
Fewer sticks than that would violate this law of measurement (I don’t know if that actually exists but it seems like it) and more than that is wasteful.
At any rate, for each bit of information you’re required to measure with one order of magnitude of precision better, so it’s clearly impossible.