Design optimization algorithms and tools for charged-particle optics and trapped ion quantum computing