This sounds very similar to what I experienced during my first and second years of my bachelor's degree in piano performance. I had pain in my wrists in a similar way to what you are describing. In my case, the cause was tension in my shoulder and thoracic outlet area (the neck) irritating nerves, resulting in referred pain down in the wrists, and it resolved as I learned how to release tension and stop it from building up in these areas when I played. It also required me to change how I used my hands so my technique in general became more relaxed. The good news is that if this is your issue, it can be fixed - last time I had wrist pain was 8-9 years or so ago. I helped a fellow student improve some similar issues once I had dealt with my own.
Things to watch out for is not just the position of your wrist or arm - you can have the right position but too much tension in the muscles. You need to learn how to keep the muscles supple, not just the wrists and arms but shoulders, neck, you name it. This will also lead to the positioning of your body automatically being right, in my experience. Also holding your breath and/or breathing shallowly can contribute.
But I would strongly advice you to seek out a good teacher with a good track record of helping students fix technique issues, since this stuff can be astonishingly hard to figure out and resolve on your own, without hands-on guidance, as you seem to have noticed.
Two questions:
- You mentioned lactic acid buildup in your post, do you ever experience this when playing in addition to the wrist pain?
- Did the pain go away when you took a break?