A lot of objects cost a lot of performance. No matter what game it is. CS2D can't magically work without consuming any CPU or bandwidth
Especially "complicated" objects like the ones you mentioned are expensive. Both turrets and NPCs have to check the environment in short intervals to detect if there's an enemy nearby. That costs CPU performance.
Also, when creating these objects the data has to be sent to all clients. This costs a lot of bandwidth and causes a lot of traffic.
CS2D also isn't optimized to handle such a large number of objects. There probably would still be a lot of room for further optimizations but I didn't see a reason to do so because it works okay with "normal" numbers of objects.
So yes, if you want to spawn big amounts of objects that cost a lot of CPU power then you have to do it on a decent server with a good bandwidth. You should check the CPU and bandwidth usage of the server (e.g. CPU with top or htop) to see what's the limiting factor.
The alternative would be to try to spawn less objects. 500 turrets/NPCs sounds like an insane amount and way too much to me. Also note that Lua will cause further slow downs if it is involved and uses hooks triggered by these objects.
I had the idea of saving buildings coordinates in a table and when a player is out of their range, these buildings will get destroyed. After they are near the coordinates these buildings could spawn again.
btw is there a way to disable the explosion after destroying turrets, dispensers...?
Also no, at least not that I know of. You want to "change ownership" of a building, closest I can think of is blow up building then immediately spawn another in its place.