I don't think piracy had anything to do with it. The DS, the wii and the 360 are all pirated a lot and the all move a bunch of software. I think the main problem is, it doesn't distinguish itself from the PS2 software whise. The DS has its own identity compared to the game cube and wii. The PSP is the exact same as the PS2. IMO there is very little difference in the type of games.
Still, saying something with 50 million in sales and is very profitable has been "killed" seems wrong, it's just the DS did everything right.