I think that solution would be a good one, Jordy.
As a suggestion, I would add an alert explaining to the user that it is common to have multiples entries with the same meta_key and post_id and that is the way WP intended to be and that only the ones that are clearly duplicated are being delete, in order to avoid an less experienced user thinking the plugin is not working. 🙂
Jordy, aren’t postmetas supposed to have multiple rows with the same post_id and meta_key?
I ask that because the get_post_meta [https://developer.ww.wp.xz.cn/reference/functions/get_post_meta/] function has a paramether to select whether to get an array or just the first value (bool $single = false).
If you remove rows just because they have the same post_id and meta_key you are in fact destroying this capability of postmeta storing multiple values.
A solution would be to first check whether there are rows with the same post_id and meta_key and afterwards check whether the value is the same.
PS: Great job offering plugins that are not bloatware. 🙂