It is a common belief among the teachers of (correct) posture and therapists that the weak back and neck muscles are to blame for the hunched posture.
But from my experience, the over-strained muscles on the front of the body are the common cause of incorrect posture. It is a habit that is learned through excessive and too frequent activation of these muscles because of the stress of fear and permanent stress of long hours of sitting or standing and staring at the screen of computer od smartphone. A good way to regain a natural upright posture is by learning and eliminating the concisely uncontrolled muscle activation on the front of the body. By restoring the ability to relax or lower the tonus of skeletal muscles, the need for stronger back muscles is dismissed, like the ones, we already have can easily maintain an upright (straightened) posture. But only if we manage to remove the subconsciously ordered tension on the front of the body with the higher awareness and intentional control. The video in the link below is typical poor advice for standing correctly, upright, and can help you to understand why it is difficult to keep the shoulders neutral over the hips.