On my last boat trailer, I went to the expense of buying solid stainless bar, cut it to length and had the ends machined and threaded to the match the old one. (I had a friend in the business!)
Never had a failed bearing after that.
Pitting on the axle due to rust is a sure fire way to allow water in and the hubs I had at the time had the seal running on the axle, rather than fixed on the axle and running inside a stainless sleeve like I have now.
At the end of the day though, there is no substitute for regular maintenance. Once a year, I go from one end of the whole rig to the other.

