When would you rewrite it instead of patching it? Patch when the structure is right and one piece is wrong: a cast, a boundary, a condition in the wrong clause, a COUNT that needs DISTINCT. Each is a small change you can explain and test.
Rewrite when the grain is wrong at the root. The worked example joined orders and items and aggregated once, so every measure from the orders side was broken by the same join. Its fan-out fix was a rewrite in miniature: one CTE per grain, each checkable on its own, joined at the output's grain.
Rewrite too when the patches are DISTINCTs and COALESCEs added until the numbers look right, or when there's a clause you can't explain. Then say what a rewrite costs: it's new code that needs its own checks. Keep the old query, and account for every row where the two outputs differ.