For example, if I want to say "(this food has) become not tasty", would the correct way to say that be "おいしくなくなりました"? How would this be distinguished from おいしく亡くなりました, "died tastily", however meaningless that may be? Is there some more idiomatic way to say the former, and can I expect ない to behave perfectly like a 形容詞?
Yes, this would be a correct way of saying "(this food has) become not tasty".
Context. Precisely because it's meaningless, and because it's a common grammar point, and in writing due to the lack of kanji for 亡くなりました. The same way おいしくなりました is not likely to be おいしく鳴りました, "rang tastily".
おいしくなくなる is fine, but you could phrase it positively like まずくなる
I think this ない is classified as 助動詞, while the ない in something like ケーキがない is a 形容詞 (Sources: goo dictionary, goo dictionary, oshiete!goo). But I believe you can just think of it as an i-adjective in terms of conjugations.
I think homophones are generally distinguished by:
I think that's true of all languages, but Japanese has a fourth way, which applies only to the written language: you can write something with a particular kanji to specify a particular homophone.
In this case, I don't think they're distinguished syntactically, so you're left with semantics and pragmatics. Devoid of context, "died tastily" is basically nonsense, so I think you'd need a very exceptional context for anyone to interpret it that way. (You could use the kanji to specify 亡くなる, but unless you came up with a context where it made sense, I think readers would assume it was a typo.)