Xiaomi's hardware is excellent; you could literally use it forever. Specifically, their batteries are remarkable. Even after six years of heavy, non-conservative use and charging, the phone still provides two days of uptime. If this were Apple, a battery replacement would be mandatory after every one or one-and-a-half years.
The only disgrace Xiaomi faces is its Global ROM, which is reportedly developed by a company located in India that is entirely controlled by Indian employees. Because of this, the Global ROMs are poor. The claim is that these Indian employees intentionally sabotage the ROMs. Xiaomi, however, may have no option: to evade US sanctions, they supposedly have to outsource this development. The only country that can do it as cheaply as China is India. Hence, Xiaomi's Global ROMs are rubbish.
On the other hand, the Chinese ROMs, which are developed by Chinese developers in China, are excellent, with no issues to complain about. They are perfect ROMs, literally free of bugs. The ROM coming from India is full of bugs.