Hello,
personally I can agree with this suggestion but only with a short time limit like 5 minutes or something similar as already mentioned in the first post.
Now, you may say, but why such a short limit? Well, that's because the main use I see here is as listed, you posted something in a completely wrong topic, something totally out of place, so just get rid of it.
However, if you posted something controversial, it started an argument, 5 people disagreed with you, so tomorrow you decided, I will just delete this and pretend nothing ever happened, this is just causing confusion and now all these replies to your post are completely irrelevant.
It's true, you can already do this by just editing your message, but at least here we have a visible trace, a clear indicator that the poster edited something, and the time of the edit. Even in platforms allowing you to delete your messages such as WhatsApp, the message won't completely disappear, you'll see that there was a message once but it was deleted.
Either ways, we shouldn't fully compare with platforms such as WhatsApp in this case, mainly because those are instant messaging platforms, people often type in a rush, messages are instantly read, and you potentially have tons of contacts and groups to manage at once. On the other hand, this is supposed to be a forum, and without intending to offend anybody, you should think a little before writing and sending your message, read what you wrote, and finally click send to post it. There is no need to rush anything, there are countless times where I wrote a reply intended for a particular topic, decided that it doesn't sound as good as I want and finally ended up posting it tomorrow, next week, or never if I've had a feeling it's not that useful/someone else already more or less said what I wanted to.
Naturally, mistakes happen to everybody, so that's why I said the initial suggestion isn't that bad. Either ways, even if it isn't implemented, you can talk to the helpers of your language if you made a mistake and posted something in the wrong topic, then the irrelevant message can be removed, so with a little communication, it's already possible.