Just thinking outside the box here, and perhaps this isn't a good way to handle this, but .....
How about have a league safety goal of a certain number of hit by pitches that decreases each year? My workplace has a goal like this that measures safety incidents per 100K employee work hours or something like that. It decreases each year. Obviously, the real goal is zero, but you have to work to improve within reason.
Looking at the graph above, I will just somewhat arbitrarily suggest 1600 HBPs for the next season. That would be about 54 per team. If you stay under that number, you get a sandwich round draft pick between rounds 2&3. If you are above that number, you lose your 3rd round draft pick.
I thing something like that would make an incentive for teams to develop players not to hit batters. The Mitch Williamses, Jim Hoeys and this guys of the world may never see an MLB field again, but that's the breaks. Get better.
Edit: For reference, the Twins had 61 HBPs in 2019 and have 27 so far this season. They would be losing draft picks.