We don't use the page numbers in the formula for our DOIs, so we haven't dealt specifically with this issue. We use publisherID/JournalAbbreviation.Year.Article ID as our DOI formula.
I know that some "publish as you go" journals just restart the page number for every article with 1, so repagination at the close of an issue never happens. However, if you're using the beginning or ending page number in your DOI formula, this won't work for you unless one of the other elements will always be distinct. I'd suggest you reconsider your DOI formula unless you have a distinct reason for selecting it. For example, we know that no two articles will ever have the same article ID in the OJS system, so we chose to use that as the final element for our formula.
Short of changing your DOI formula, I"m not sure how you can be certain that all DOIs will be unique (which is the source of their value in the first place). The only other thing I can possibly think of is to make each individual article its own numbered issue record, in which you name the year's worth of articles/issues under one volume number, and then include the issue number in the DOI formula. But that seems pretty clunky to me.
I hope this response helps you in forming your ultimate decision.