Don’t feel bad. The end result was positive. Sales increased enough that the cost will be made up in a few months. Person actually made out well considering the effect of the work.
But yeah considering that revenues have only gone up, might as well just call it a cost of doing business. Learn from it and move on. (It sounds like this is exactly what he's doing.)
Things can be positive and cost-effective, too.
That said, margins on this kind of hardware product aren't great. The author has shared them before. https://mtlynch.io/solo-developer-year-3/