I don't have a security deposit on any of my apartments, but I put in my rules, that any damages caused or items (keys etc.) lost, will be settled before departure.
I have had 184 completed trips so far, and only a handful of guests where we had to settle some damages. And only in two of these cases, have the guest tried to get out of it.
Fortunately I have to copy the ID of my guests, as a law in Thailand, and I can at any point call the autorities and claim that my guests have run from a bill, which results in them not being able to leave the country, before it is settled. I haven't had to play this card yet, fortunately, but it is a nice safety net for me 🙂
Of course I am always fair in the cases where my guests break or lose something, and only charge them what it would cost me to repair or replace the item.