If you're properly balanced left to right, as is no joint injuries, I think a basic strength routine would build your spinal muscles and posterior chain.
Mark Rippetoe's book Starting Strenght would be my recommendation.
https://smile.amazon.com/dp/0982522738/ref=cm_sw_r_cp_apa_i_uCKxFbEN62H1P
That's why I specified "a firm (but not hard)" tug. A lot of it depends on how developed your back muscles are. In my experience, when I first started doing it, I needed to strain those lower back muscles a bit (just a little bit, PLEASE don't go nuts) to get myself into a proper posture, and this exercise is most helpful for people who have spend their lives not using those muscles (which is most Westerners). As my muscles started to develop, I noticed that when I visualized myself "pulling the string tight" my spine and neck would align into a straight position which, as you pointed out, is not helpful for posture. I thought about including all this in my original post but I didn't want to make it confusing, and I imagine the majority of the people who are coming to this subreddit for advice are probably in a position where a lifetime of chairs with tons of back support has left those muscles really weak.
From my experience (and I want to stress that this section is something I myself have worked out personally, wheras everything I said I've heard from multiple sources that I personally trust, in particular this Teaching Company course by Rhodes College professor Mark W. Muesse) the best way to tell whether you are doing this right is by paying attention to your breath and adjusting your the amount of strength you are using to support your back until your breathing feels most comfortable.