I was using a clothes dryer that was in a rented house and it was 40 years old. I think it was an old Maytag dryer and the washing machine was the same brand and age.
Both the 40 year old washing machine and dryer were working like new.
But today's appliances will likely not last 40 years. You can maybe get 10 years minimum out of a new clothes dryer or washing machine today.