When you sell to open, there is a buyer for the order to get filled. At this point, you become the buyer to close the option if you thus desire. If you're selling puts, yes ensure they're cash secured. This avoids anything like the scenario you described.
The difference here is you're not betting with leverage. Modest, high probability returns.
If this didn't make sense and to be super clear. You described buying an option and attempting to sell it later. This is not what I'm describing. I'm describing selling and option to open