Collective Escape of Chemotactic Swimmers through Microscopic Ratchets