Use the right tool and technique - with a really stuck stem wedge you should use the flat side of a small to medium ball pein hammer with a piece of aluminum or hardwood on top of the stem bolt.
It can be awkward, so usually it helps to have a helper hold the bars.
Why would you use a rubber mallet here or a deadblow ? Are you trying to replace a hubcap on one of those smelly tin boxes (automobiles) ?
The little line that can mar the stem finish is often the result of a sharp edge at the top of the inside steerer. A $3 Horror Freight deburring tool can be your friend here.