Most rewrite decisions get made by staring at the new architecture. That's the wrong thing to study. What decides whether a rewrite succeeds is how well you can observe the system you're replacing.
Five questions, in the order they actually bite.
Can you enumerate the real inputs? Not the documented endpoints, the actual traffic. In payment systems the surprises don't come from the happy path. They come from the partial payment, the duplicate callback, the provider that sends a status transition nobody wrote down. If you can't produce a list of input shapes seen in production, your new code is specified against a fiction.
Can you run both paths against the same input and diff the result? Shadow the legacy implementation, send it the same traffic, compare outputs. That single control is what turns a rewrite from a bet into an engineering task. Without it you find out about divergence from a user complaint, weeks later.
Where does the behaviour live, in the code or in the data? Legacy migrations fail here most often. Years of accumulated records encode decisions the code no longer makes: states that can't be reached anymore, fields populated by a rule that was removed. Rewrite the code and the old rows still have to be interpretable. That constraint belongs in the design, not in the cleanup phase.
What is the rollback unit? If the answer is "the whole service," the rewrite is one irreversible event. Slice it so each piece can be switched back on its own: per endpoint, per flow, per record type. A rewrite you can only finish or abandon will get finished badly.
Who carries the invariants that aren't in a test? Idempotency boundaries, ordering guarantees, what has to stay atomic. Every legacy system has correctness properties held only in someone's head or in the shape of the schema. Write them down before the first commit, because they won't survive translation by accident.
My take: the cost of a rewrite is dominated by the gap between how the old system actually behaves and how you believe it behaves. Narrowing that gap is work you can do before you decide anything, and it pays off whether you rewrite or not. The Python 2 to 3 migrations and monolith-to-services jobs I've done that went calmly all shared one thing: the diffing harness existed before the new code did.
If you've done one, I'd like to know which way it went: the comparison harness first, or added after the first silent divergence...