Modern class D is getting better. The problem in the past was that the class AB amplifiers inside a speaker enclosure got pretty hot due to the lack of ventilation. Class D gets around the dissipation problem, and if HQ caps are used there's no reason why it shouldn't last for 20 years minimum.
My personal preference would be a speaker with active bass and passive mid / treble but the future is probably 100% active for the bulk of the consumer market, and really not too far away. Many audiophiles will still prefer passive speakers though and the industry will oblige them with lovely speaker cables that cost almost as much as their high end speakers.
Even so, from a reliability and ease of getting the system working standpoint, having the amplifier separate is better. With a separate amplifier, one can decide whether to repair or simply replace the amplifier, whereas with a built-in amplifier, when the amplifier is tailored to the specific speaker (otherwise, there is no point, as far as performance is concerned, for it being built-in), one is faced with either repairing it or replacing both the amplifier and the speaker, which is more expensive than just replacing an amplifier (or just a speaker, in the unlikely event that it is the speaker that fails first). With both pairs of my computer speakers that had amplifier troubles, and with one of my subwoofers that had amplifier troubles, getting the right parts turned out to be impossible. Thus, they could not be properly fixed, and so I was faced with replacing everything, instead of just a faulty amplifier.
I will never buy a speaker with a built-in amplifier whenever I can get one without it that will be fine for my application. If other people wish to buy them, that is their choice, though I would advise against it due to my experience already mentioned in this thread.
It is somewhat ironic that with my unpowered SVS CS-Ultra subwoofers and separate amplifier, it would be easy to replace the amplifier if needed, but it has not been needed. But when I have had built-in amplifiers, when it is difficult to have them replaced, that is when they have frequently failed in my case.
And, again, I know absolutely that my situation is far from rare, as many manufacturers of powered subwoofers and other powered speakers have a shorter warranty on the amplifier than on the speaker, so the manufacturer knows they are selling powered speakers with unreliable amplifiers. These manufacturers are warning you that the amplifiers are unreliable, and I strongly suggest that people heed the warning and buy something else instead, without a built-in amplifier.