UndoManager memory consumption?

I’d like to have a feature that undo affects only individual midi clip content changes. I.e. when I’m editing one MIDI clip and then perform Undo lots of time, this wouldn’t undo content from other clips than the one being edited. What’s the best way to do this? Is it a viable option to make each MIDI clip have their very own UndoManager or should I consider some other approach?