I have useused both hourly billing and flat fee billing. I used to always favour hourly billing on the basis that I felt it was more ethical, but soon changed my mind about this.
What the client asks for / insists on. Whether or not I agree it is the best fit, do I refuse for ethical or practical reasons, even if I want the contract? Often I will just accommodate but explain why I think it is a bad idea e.g. that they may end up paying more. I will explain, if necessary, that my hourly rate is quite high for this one because I am charging for my experience/skill level. If I know the client well, or they are favoured and I want to keep their custom, I will be more accommodating with them than with others.
If it is a short and easily estimable job, particularly if it does not require much skill (e.g. making customer-requested edits to a finished work). In these cases it is sometimes easier to just say "This will take me two hourhours to do and I will charge £60 an hour."
If is a long and not-so-easily estimable job, and I know that I will likely either over or under-estimate it, I will use my best estimate of the hours worked (with some slippage time) but quote the fixed fee because I cannot determine if an hourly rate would work out better or worse for the customer. If the fixed fee I give is agreeable to the customer, then there's no worries on either side - we're both happy.
As you implied in the question, and you can see from the above, that this is a more complex topic than just saying one is more ethical than the other. It depends on several factors such as the the particular circumstances of the business arrangement.
Your intention - do you intend to deceive your customer?
Your honesty and clarity upfront in the contract.
Do you stick to your contract/fee, even if your chosen billing method resulted in a loss to you, and chalk it up as a learning experience?
Are you willing to shift your fee position if your mistaken choice of billing method ended up causing loss to your customer? (If it's your mistake, your customer should not have to pay for it.)
So my TL/DR answer to your question is: