Registering a new account through wikimedia login works. After the first time I decided to remove the account. Then I noticed that also the post by that account was removed. I didn’t expect that to happen.
This is a Discourse feature independent from the Wikimedia login plugin.
Users can self-delete their account if they have 0-1 posts published. After the 2nd post, they need an admin to delete their account. In that case, admins can decide to anonymize the deleted account in order to preserve their posts.