【聞こえる】 is the intransitive form (自動詞) of 【聞く】, which is a transitive verb (他動詞).
And 【聞ける】 is the potential form of 【聞く】
音が聞こえる = The sound is audible
音が聞ける = I can hear the sound
In japanese, you can use some verbs' intransitive form to express the potential, so that you can do something, especially 【聞こえる】 and 【見える】.
The nuance between both sentences above is :
音が聞こえる = The sound is audible, so you can hear it and it just feels like a simple potential form.
音が聞ける = I can hear the sound, I have ears, or something made you be able to hear the sound for example.
The same goes with 【見れる】 and 【見える】, usually we would use the intransitive form to express the potentiality.
As for you sentences :
聞こえなくなった = It became unaudible, so you couldn't hear it anymore.
聞けなくなった = I became unable to hear, because I had put a cask on my head for example.
That's the way I see them.