I'm starting to be wary of the frequency of Shimano bonded crank arm failures and I want to stick to the highest series that still uses the solid, non-hollow crank arms.
I agree with MaplePanda that only the highest level of Shimano cranksets feature the weight reducing process of hollow bonding. This would be XTR on the mountain side and Ultegra and DuraAce on the road side. These use "Hollowglide" technology which refers to a hollow large chainring, but also appears to encompass the spider of these forged cranks. See a link for this tech in the comments. While it's possible other groupsets are affected, the bonded crank arm failure was predominately in the Ultegra road cranks. This is what you'll find online when videos or discussion of the issue is the subject (almost always an Ultegra crankset).
In looking at the MTB crankset section of Shimano's Specification sheet, one can see that Hollowtech2 technology encompasses mountain cranksets up to FC-M6100, a Deore level 12 speed, where apparently a different manufacturing process is utilized as it does not specify the M6100 as Hollowtech2. It is still a 2 piece crankset utilizing outboard bearings. For a more traditional crankset that utilizes a cartridge bearing BB, one has to go down to FC-MT101, a Tourney level, square taper spindle crankset.
The link above shows specifications for only the latest 2 or 3 generations of components. Should one want a higher level crankset that uses a cartridge BB like Octalink, one needs to look back to older 10 speed groups. I also believe that some Alivo level cranks (FC-M4000) are offered in both 2 piece (outboard bearing) and 3 piece (cartridge bearing) models.
Dipping a bit into the opinion aspect, Shimano maintains a very high quality option for components. I don't feel you should be swayed from one of their Hollow forged cranksets based on some failures largely confined to one road group. The abundance of opinion and much of what are considered facts point to a high regard for their products including cranksets. One fact that's ess is XTR level components are backed by a 3 year warranty. XT level on down get 2 years warranty AND that is transferrable if the sales reciept follows along to the new owner.
Edit: There are several anecdotal reports of high end Shimano cranks failing in very similar fashion. The crank arms made of aluminum are forged in at least 2 parts and these parts are then bonded with some sort of glue or epoxy that cements the pieces together making a whole, hollow, lightweight crankarm. Cross sectioning a crankarm reveals the two pieces that come together are each "U" shaped--the outer aspect is the larger "u" and fits over the inner and smaller "u". They are bonded together to make the whole. With the cranks that have failed, it appears as though this bonding has failed, leading to a separation of the two bonded sides of the crank leading to complete failure. BikeRadar has published an excellent discussion of a failure of one of these crankarms. Note that lower tier Shimano cranks are also similarly manufactured with the end result of a hollow crankarm. The difference here is that welding is used as the joining process as opposed to chemical bonding with glue or epoxy.
This article from Wired magazine discusses product failure, warranties, and explicitly states how averse any company is to revealing statistics related to product failures, warranty claims and the fiscal set-aside for claims and replacements.
Shimano 105 cranksets are welded, not bonded. So they're stronger but heavier. Ultegra and Duraace are bonded in modern groupsets. I can't speak to MTB or Gravel groupsets.
He's contentious, but here's Hambini suggesting that one solution is to get Shimano 105 or a Rotor crankset. The rest of that video shows his dissection of a failed duraace crankset. Mind the volume in the first 10 seconds.