Everyone is different. By far, the longest I went without having an orgasm was 50 days while my wife was not feeling well toward the end of her third pregnancy. It wasn't a sexual thing for her, but for some reason she LIKED that I was abstaining from jerking off. Did I feel lonely and rejected part of the time? Yes. Did I get over it? Yes. And I ran a lot and lost a bunch of weight. It was not the high point of kink in my house, but it was a good experience.
Being locked while she's pregnant is a wonderful expression of support for her. That way if she isn't in the mood or isn't able to have fun, well, you can't go pleasure yourself either. Worked well for us and continues to.
My wife lost all interest in sex or chastity last time she was pregnant and for a period after, see my other posts for more info. I think all people are different and you should talk and see what works for you as a couple.