I would agree to a certain extent.
If the machine is a good make and was expensive but died after 4years I would consider a repair.
Our machine,a Bosch,is giving up now after 13years service with worn out bearing.We have had one callout for a breakdown and two callouts to repair accidents i.e.sock ingested by drain pump and door seal pulled out of fitting.
I think it is time to go and we have another updated Bosch awaiting delivery.
If the machine is a relatively cheap make I don't think I would bother with a repair call out.As you say the cost would likely to be half the cost of a replacement.I just ordered a new machine from" appliance online" and they are doing springtime deals at the moment.They deliver usually free and take your old machine away for £9.99p if you want