This depends on how well the machine is made. That means the quality and quantity of its materials. If it's super-automatic it also has to do with the technology and electronics. The machines with stainless steel boilers or steel frames will last longer than the ones made from cheaper materials. Two parts can be problematic: the heating element (for non-lever machines), and the pump mechanism. High-quality, long-lasting components are best for espresso machines. They can be repaired and reused if they become a problem.