Counting templates instead of pages is the single change that explains most of the gap between two quotes for "a 10-page site", and I wish more buyers knew to ask for it. The same goes for your point that a payment gateway is finished only when refunds, failed payments and duplicate webhooks are handled, rather than when the happy path works.
Splitting the quote in two when a brief straddles types, such as a service site with a client portal, is the part I would underline. It keeps the expensive, riskier piece visible as its own problem with its own price and its own definition of done, instead of hiding it inside a total.
We scope client work in a similar way, one clearly defined problem at a time, and the integrations are almost always where the honest conversation happens. Do you put the change-request terms in the first quote, or only once the scope is signed?