1.) Perimeter barrier with access controlled gate
2.) Quick access teleporter outside perimeter barrier
3.) Fully enclosed safe room somewhere
Adopt those in some fashion in ANY housing design, and you will be fine.
One of my favorite designs. It was in PK central and if the owner could actually make it to the porch...was very safe.
While I was decorating it, a PK gave me a free test (which he didn't realize) trying to find weak places in the design while I was in the perimeter decorating. I did lose a pack animal that went through the teleporter and ended up on the porch in his reach but that was the only casualty.
-Skylark