Perfect posture can still hurt.
Ergonomics help. A good chair and a good setup lower the strain of your work. But you have to remember to use them, and that’s harder done than said.
When you get tired, you forget. Your form slips, just like an athlete who loses footwork and timing late in the game. That’s when mistakes and injuries happen.
So the answer is both. Use ergonomics. Then build the strength and conditioning, what I call capacity, so you don’t fatigue and forget.
That’s how dentists and hygienists do the job well without long-term pain.