Hey! depending on the amount of enemies, normal pathfinding will no longer work, this would be because of the large quantity of NPCs that would be moving.
The best way for optimizing the pathfinding of the multitude of NPC’s would be using the technique known as Flow Field Pathfinding which I elaborated on a little here. Basically, the idea is to gridify your map/location and each grid gives a coordinate which any NPC in that grid would follow to the next grid, eventually leading to the desired end goal.
If you have any questions or concerns please contact me and I’ll be glad to help!