Just to expand a little, there's a risk with any brand. Canyon batteries, YT evaporating & taking customer's money with them, Intense, Focus quitting Europe and so on. The safe option is to stick with either a native brand like Whyte but probably not Deviate or a global juggernaut, Spesh, Trek, Giant, Halfords(!) & their extensive dealer in every town networks.
But even then, your worst exposure is really only two years or so on whatever warranty they offer that covers major componentry like motors, batteries wheels or whatever. After that, you're into a used bike where like all the others, the bulk of components are just bolt on third party stuff that people routinely upgrade & service independently of the brand.
Which leaves frames. Before Accell bought Lapierre, my local LBS dropped them as a brand & the reason was that every frame issue resulted in LP requiring the frame to be returned to France for inspection & customers just weren't willing to put up with no bike for six weeks while Lapierre stroked their beards, sucked their teeth & poked the bike with a pencil while they made their minds up. Those are the main factors I would take into account but also with a degree of perspective - bikes are generally great & reliable now, the market is competitive & that drives service and most of us aren't park rats hucking to flat day & night, putting the bikes through the wringer.