The difficulty isn't in the UI controls or an automated job. It's parsing posts and storing relationships.
Also users copy-pasting an existing links to a different post or off-platform comes with its own set of challenges.
The way file uploads were implemented in Flarum using a bbcode means the uploads aren't actually linked to a post, they are currently standalone entities.
Of course it's all doable, but with the limited FriendsOfFlarum manpower, this might have to wait until someone sponsors the feature.
I did implement upload linking and auto-cleanup in my premium Formulaire extension, but it's a bit of a different use case from here. And I had the benefit or starting from scratch and not having to deal with backward compatibility.