And sure, the ninth Gym can be added, but if you want an extra badge, you'll need ASM.
HackMew wrote some code and a template script for taking away pokemon. There is a whole thread for it in R&D if I am not mistaken.
Delete the map script. It is in the header for map 3.0.