Wouldn't there be two options:
Accept the penalty and replay the down from the 5 yd line
Decline it and take the safety
I think the question was asking about a third option - taking the result of the play (safety) and enforcing on the subsequent kick/spot, like you could for a foul on a touchdown, try or field goal. The enforcement on the ensuing play language is not included for safeties, so your two options are the only two options.
However, even if if that was a possibility, you would never free kick from the 5. The succeeding spot enforcement after other scoring plays would never be from the spot of the foul -- however, this is a hypothetical enforcement of something that's not in the rules, so don't dissect that too much.