Grandpa Kim if your enemy is using cheap boarding ships to get your vessels to self destruct, then yes Security stations would be better than SDD. Security stations are the same size and cost as boarding parties of the same tech level, and between 2 to 3 times as effective, depending on tech level.
However one 10K SDD will stop as many boarding parties as the enemy puts on their ship. And it has another use, eliminating those pesky maint costing ships that are out of fuel or damaged and out of reach of a yard. So like everything else there are tradeoffs. And there is nothing stopping you form using both.
Also, as discussed in another thread recently, shields and one shield regenerator comp will prevent boarding, at least until the regenerator comp is destroyed.
Geoschmo