Impossible through legitimate gameplay. Master Balls are intentionally rare—typically only one is obtainable per game via story progression (from Professor Sycamore in Pokémon X). Additional Master Balls can only be acquired through:
Obtaining 999 Master Balls requires external tools or exploits, not normal play. Nintendo may ban hacked inventories from online services.