Quantum magnetism of spin-ladder compounds with trapped-ion crystals