If anyone's interested: I wrote a small free app that runs completely client-side in the browser via your webcam, and gives an audible alert if your posture changes:
The physical therapists I’ve talked to have been very clear that staying in the same position for too long is a primary driver of pain.
So, I’m not sure if this is a whole solution.
In one’s mind sitting straight can be actually wrong as in sticking the neck out in an unnatural position or something like that. Mirrors help as well but more important is proper ergonomics: keyboard closer to body and within reach so that elbows sit close to the body, then desk height, chair height, position of feet on the ground and so on. In my 20s I suffered a lot and now in my 40s I rarely experience any back pain and don’t require any special chair either anymore. I also do not lean on the back rest 90% of the day.