On my older (1990) Starcraft the hitch was also very worn out, to the point that I wanted to use a hammer (but never did.) It was welded to the frame and I didn't want to go through the trouble and expense of putting a new one on.
If yours is a Curt or similar brand (like the one below), repair kits are available but hard to find and expensive. Best thing to do is go to your local auto parts store, buy a new coupler that matches yours, and swap out the moving parts on your hitch. It's usually a single bolt with a spring, the latch and parts that hold the ball tight (don't know what they're called). You'll need to adjust the spring tension, but lots of videos online on how to do that.