EU and election authorities have demanded change to make it private but the previously ruling party didn't want to. Now we got a new government a few months ago and this was one of their first tasks, so it might be changed in time for the election in 2026.
> Your family, friends and the whole neighborhood will know whomever voted for the wrong party and will treat you thereafter.
"Repercussions" from family or neighbours, sure, but not from whoever has the monopoly on violence. I haven't heard of the Swedish government going after people that "voted wrong".