Mask-based lensless imaging uses an optical encoder (e.g. a phase or amplitude mask) to capture measurements, then a computational decoding algorithm to reconstruct images. In this work, we evaluate and design encoders based on the information content of their measurements using mutual information estimation. With this approach, we formalize the object-dependent nature of lensless imaging and study the interdependence between object sparsity, encoder multiplexing, and noise. Our analysis reveals that optimal encoder designs should tailor encoder multiplexing to object sparsity for maximum information capture, and that all optimally-encoded measurements share the same level of sparsity. Using mutual information-based optimization, we design information-optimal encoders with improved downstream reconstruction performance. We validate the benefits of reduced multiplexing for dense, natural images by evaluating experimental lensless imaging systems directly from captured measurements, without the need for image formation models, reconstruction algorithms, or ground truth images. Our comprehensive analysis establishes design and engineering principles for improving lensless imaging systems, and offers a model for the study of general multiplexing systems, especially those with object-dependent performance.