Yes, totally agree that Agile’s tactics are leading to lower quality software. I’ve seen it many times where developers start compromising quality when reaching the end of a sprint and this happens every two weeks.
‘Will do it properly later’ never comes and mediocre quality and technical debt start creeping in.
The Agile Manifesto should be revised or maybe the Manifesto’s guidelines should be taken lightly.
Also one approach that worked is including specific high quality epics/stories/tasks, like ‘building the input validation library’ or ‘building the workflow using the state machine pattern’ or other quality focused tasks being mentioned explicitly.