18 years is a good run for a VFD. I have seen some last 30 years. The ones that last that long help extend the average life to like 3-5 years, taking into account all the VFD's that didn't last a year or even a month. To get a VFD pump system to last a while the controller needs to be in a clean and cool environment, the control and power wires cannot be crossed, the drop wire needs to be as short as possible, all the parameters need to be set correctly, and many other things need to be correct. Even then they are temperamental to lightning, dust, and other things. Many VFD's do not even maintain constant pressure. I am currently helping a couple people with a Goulds Solo2 and a Pentair PID, and neither will hold a constant pressure. Many VFD's have a "bump feature" or just cycle on/off every minute or so because of the complexity of figuring the minimum frequency required for each different system. That is just one of the many ways VFD's do not function as you would think they should, on top of a high cost and high failure rate.
Then if you find a brand of VFD that has lasted a few years, that model will no longer be available. New model VFD's come on the market as fast a new cell phones. Each new model promising to have solved all the problems associated with the previous models. I have been waiting for more than 30 years for them to solve all the problems with variable speed pumps and controllers. I quit holding my breath long ago. In the meantime I continue to sell Cycle Stop Valves to solve the problems people have with VFD's and large pressure tanks.
But if I was still in the pump business I would sell a VFD to anyone who ask for it. Mad customers spend a lot of money keeping VFD systems working. Happy customers never call the pump man.