Spend the money instead on a new gas dryer.
It’ll cost you in the same ballpark as the electrical work and will save you a couple hundred bucks a year in utility bills. (A load in gas dryer is about half the cost as electric).
edit …
Same thing happened to me 10 years ago. I don;t regret selling my almost new dryer on craiglist for $200 and eating the costs of the new dryer. It has paid for itself twice over the 10 years.