Electrical stimulation with neural implants can restore lost sensory function by evoking patterns of activity in neural populations. However, stimulation with many electrodes generally combines nonlinearly to influence neural activity, and is thus difficult to control. To overcome this challenge, we propose a dynamic stimulation approach that exploits the slow time scales of downstream neural processing and the independence of distant electrodes by encoding a complex visual stimulus into a rapid, greedily chosen, temporally dithered and spatially multiplexed sequence of simple stimulation patterns. The approach was evaluated using a lab prototype of a retinal implant: large-scale, high-resolution multi-electrode stimulation and recording of primate retinal ganglion cells ex vivo. Greedy dithering and multiplexing provided a powerful framework for optimizing electrical stimulation, greatly enhancing expected performance compared to existing open loop approaches. The modular framework enabled parallel extensions to naturalistic and dynamic viewing conditions, optimization of perceptual similarity measures and efficient hardware implementation for retinal implants.