I don't see the difference in safety between ghosting and sending a text saying "This isn't going to work out, you're just not the one for me"
Not replying / blocking them after is fine. That's not really ghosting anymore.
In fact, I'd suggest the safety improved from texting that, since the majority wouldn't bother trying to reach you using other methods, whereas with no reply at all, they may try to reach you some other way like in person.