I think the premise of the question is flawed. It isn't that rangefinders have struggled in the era of digital - it's. It's that rangefinders struggled to survive the era of the SLR.
The The SLR started putting the rangefinder to bed long before digital came along. Canon Canon produced its last rangefinder in the Canon 7 (intro'dintroduced in '611961).
Leica has gone upstream with their product and target market. They They make highly capable, very pricey cameras targeted to a very specific type of consumer. The The rest of the brands went a bit more mass market.
Today, the mirrorless and compacts fit the same need as the rangefinder did. Want a small, pocket-friendly camera for snapshots? Digital compact.
Want a lightweight, more capable camera for your travel photos? Mirrorless.
Want a small, pocket-friendly camera for snapshots? Digital compact.
Want a lightweight, more capable camera for your travel photos? Mirrorless.
It's all about market needs. A A huge chunk of the rangefinder market went to film compacts or SLRs as their needs dictated. When When digital came along, they went to digital compacts or mirrorless. There's There's simply no space in the mass market for a digital rangefinder. Leica Leica is niche —– there's no market room for the mass market brands to either get in on that niche or attempt to expand it.