Simulate "redacted" text effect in TextMeshPro

I’d like to simulate an ability to redact text, here is the scheme of what I am trying to achieve:


so, some part of text should be replaced with other text placed on top of it. New text should not move old text (so it should stay in green boundaries). New text can be longer or shorter than old text (font size in New text can be adjusted accordingly). New text can contain indentation. Is there a way to do that with TextMeshPro without doing a lot of voodoo magic? The only way at this moment that I can think of is to place another TextMeshPro block on top of an old one, fill it with spaces with the Font Size same as in old text and calculate the position of new characters and write them there, but it sounds incredibly stupid. However, I just can’t think of any good idea…

bump