Most modern "Mag" wheels are actually cast Aluminum. Some are strong and can take a hit ... some not so much. Varies bike to bike ... but generally speaking spoked steel or Aluminum wheels are best off road.
That said, I managed 90,000 miles on my '02 DL1000 V-Strom and did plenty of Off Road, but wider, faster pistes, not single track and no steep ups or downs to speak of. But in Baja I did hit embedded rocks at high speeds very hard. I dented my wheels ... but never broke them.
NOTE: I've also dented the wheels on MOST of my dirt bikes and on my current DR650 ... all have spoked wheels and are designed to go Off Road.
Others with cast wheels have not had this sort of luck. (but is it luck at 90,000 miles? ... or just tough, well made DID wheels?)
If you have a choice and intend to ride a fully loaded bike off road, go with spoked wheels. If you have no choice and must ride Cast wheels, then take it easy, run Super TOUGH tires and keep pressures between 18 PSI and 22 PSI when Off Road. You will make it ... but DO take care with BMW or KTM Behr wheels ... they are like butter. Japanese DID wheels or Excel.
Long stretches like pic below makes it tempting to speed up to lessen wash board affect ... here I got up to 80 mph ... then hit embedded rock and dented a rim! Continued on, no problem. A DENT is not a break or crack ... but that can happen with a cast wheel.