Your programmers are not fantasizing about a rewrite if you notice a new feature takes 3x longer time to ship than before or they start taking frequent coffee breaks during a sprint.
Once upon a time, I was a bystander in a heated argument among the senior engineers and the non-tech top management of a big-data tech company. The engineers were trying to convince the top management to go with a complete rewrite of a critical part of the backend – the data processing pipeline.
As a new hire, barely 3 months on my job, I did not know much about the details of the project. So I could only watched with apprehension as they argued among themselves.