is my murphy bed doable and safe?
I'd say you have two options.  Attach the top of the murphy bed to studs; or build the bed with a substantial base which juts out from the wall quite a bit, like a sofa.  How to make the latter non-ridiculous would be a design challenge.