In your definitions, "sustained" is unique to "moan." A moan would be made by a living thing, or by something which imitates a living thing. It would tend to be a vowel, or singing sound, although probably not a constant pitch.
Hopefully Jim or Kooyeen will get in on this. They're really into sounds.
For groan, your #2 definition describes non-living sounds, in the same category as "creaking."
The old house groaned under the force of the hurricane.
As you can see from your definitions, both terms can indicate pain, suffering, and unhappiness; so it's impossible for the context to pin these cases down. You specify which sound it is, and hope the reader understands the difference.
We heard a moan/groan coming from behind the bushes, and discovered a man who had been badly beaten.
The woman held the dead baby in her arms, moaning softly.
- A.