If you are working from home with less overheads then it's easier to take on such work, but if you have a commercial workshop then you really need to be charging by the hour, regardless of end result. Overheads don't go on hold while you're reverse engineering a tricky schematic.
Understood. But why is that the customer's problem? As I've said before: the customer doesn't care about your overheads - they care about getting their appliance fixed. The customer assumes that you charge enough to cover your costs and salary, but they don't need or want to know about the details. They don't care whether you pay rent or own the place.
The problem with charging by the hour is that it looks to the customer like an open-ended money-making racket. The key issue here is that
the risk is all on the customer, not shared between the two of you. You can sit back and take your time, or you can work quickly, secure in the knowledge that you will take home $200 for every hour spent. Even hours spent reading the newspaper. The customer has no such security - they know you can charge whatever you like (they have no idea how long it really took you).
That's why, from the customer's point of view, a firm quotation with no fix/no fee is the only fair billing model.
I don't do electronics repairs - I'm a horologist who does repairs clocks and watches. I have two billing models. A lot of my work comes from another clock repairer who prefers to work on larger items like longcase (grandfather) clocks, so he sends me the smaller stuff. He pays me £250 per clock to restore the clock to good working order, and that doesn't vary regardless of what needs doing. So sometimes I might spend a couple of hours on a clock, other times In might spend a couple of days. (Those are the extremes.) The advantage to him is that he knows exactly what he'll be paying me for each clock. The advantage to me is that I don't need to mess about doing quotes or estimates. If I find that I'm not making enough money overall then I will negotiate a higher price per clock.
That model is for trade work. For my own customers I will either give a firm quote when they bring it to me, or examine it and ring them back with a quote. At that point they can say either 'yes' or 'no'. If they say yes, then they get a no fix/no fee deal.
Occasionally I discover a problem that requires an expensive new part. I then decide whether to eat the cost myself or pass it on. If it's too much I ring the customer and explain their two options: 1/ they can pay the extra and the work will continue; or 2/ they can have the clock back unrepaired and pay nothing (the no fix/no fee part of the deal).
To me that seems to be the only fair way of dealing with customers. They don't know my hourly rate, they don't know what overheads I have, they don't even know if I have staff working for me. And that's how it should be: the only thing they care about is how much it'll cost to repair their appliance. And then they can say 'yes' or 'no'.
Can you imagine walking into a corner shop and asking "How much is that can of soup?". And the shopkeeper says "Well, because of my overheads I need to make $200 per hour, plus the wholesale cost of the soup, so wait here while I fetch it and we'll see how long it takes me." It would be absurd, but that is what we do to our customers.