OK, so there are several "classes" of self-solves and not all are bad.
Class 1: the real solution
There are a number of threads where the OP posted about a problem, got no immediate reply, spent several hours finding a solution, then posted back with their findings and a good, detailed, answer.
These can be left as they are (and should be actively
ed when found).
Class 2: marking confirmation instead of suggestion
This class of self-solves includes where several people have responded, and one or more includes the pointer or solution to the issue. The OP then replies back to say they solved the issue using one of the suggestions earlier in the thread, marking their own "confirmation" post as the Solution.
TL3s should feel free to comment in the thread then mark the actual solution post as the Solution. If there are any issues then call in a moderator (who can e.g. revert edits and make posts or the whole thread read-only).
Class 3: the pointless answer
"Never mind." "I fixed it." "Fixed after a reboot." etc. etc. etc.
These threads are of no use to anyone with an issue in the future and so add little or no value to the forum. These threads should be Flagged (Custom) so they can be Unlisted.
This badge is awarded manually (and so far only by me). Whoever has this badge really has done some very good work.
I don't know if it's possible to edit a built-in badge but I'll have a look at the Discourse SQL.
Edit:
Actually, this is already the case. You don't get "credit" for self-solves:
...
JOIN topics t1 ON p1.topic_id = t1.id
WHERE p1.user_id <> t1.user_id AND
name = 'is_accepted_answer' AND
...