Clearing and text in canvas, over and over again

Hi all!

I have a use case when I want to undo something that I draw on a canvas. I stumbled across some answer in Stackoverflow however the solution is to, redraw everything again. not just undo it.

So the flow is like this.

Draw image => draw overlay => add text

If I want to undo add text I must repeat the steps not just removing it from the canvas, Is this right? or you suggest me to had two canvas that overlay next to other?