I think you are only the 2nd one on this forum I know of in Idaho besides me ..... Which is weird since this is one of the most off-road friendly states there is , you would think there would be more of us ....
Also , as far as the muffler goes , I am sure it is as restricted as the older (05-18) stock X one , what it will do is more than likely just cause the engine to be sluggish , due to the baffling , but I doubt that would contribute to the stalling ....... my money is on the clutch and mapping and possibly gearing for that ...... In reading the reviews on all the newer Honda's , it seems they are all set up for faster riding (even my 06 seemed that way) , and they need a little refining for the tighter stuff (whether it be the X or R/X) , I would also look into a flywheel or flywheel weight as a plus for the stalling issue , you could go with a Rekluse , but I personally am not a fan and have found I can go anywhere with a stock clutch that someone with a Rekluse can , and I have a bum Ken Roczen-ish hand (same injury as Ken had , same hand *clutch* and mine was not fortunate enough to get 13 surgeries I did mine at OMC in Boise practicing for a Old Timers Race in 2016 , so I have limited movement of mine , and can still work the clutch well enough to not stall) , my clutch in my 06 is original , I am talking the same plates that came with it when new , original , I have never had a issue with the clutch and have not replaced any part of it , the Judder Spring clutches are a different story , and every bike with them has a complaint history of stalling (my buddy has a 18 RMZ450 , and stalls it all the time , been trying to get him to eliminate it , but he has not yet)
Surprisingly , the cam made a huge difference with my stalling , and I did not feel the need for a flywheel weight after installing it , as was my original intention , but after riding it , I felt it was not necessary .... Adding 1 tooth to the rear (from 51 to 52) was a huge improvement , you would not think 1 tooth would make a difference , but in the tighter stuff it allowed the engine to jump right up in RPM's (this along with re-jetting , which should not be as much of a issue with a EFI bike) ..... Whether the bike is new or a older model , the bike still needs to be set up for tighter stuff , as most of the placement of the bikes design would be oriented towards desert riding , not tight single track , that was the market these bikes were designed for , anything outside of faster moving trails/roads , the bikes have to be (unlike KTM or other "single track" off-road specific bikes) modded to properly do what you are wanting (same as what I went thru with my 06) .......... I would go with the clutch mod first , and eliminate the judder spring setup , then get the gearing adjusted , what you want with the gearing is to be able to ride the majority of where you usually ride , without needing to shift every 50 ft , I run the majority of trails in 3rd , when I get to the tight stuff , i am in 2nd , in all but the slower than walking pace stuff , I can use 2nd , and rarely use first unless I am virtually stopped and inching thru something , that was done with just 1 tooth , I have gone frome 51-54 and 13 front to 12 and 14 , and with my 06 (the one you have has different internal gearing) going from 13/51 to 13/52 was a major improvement to put the meat of the engine within the usable range for the type of riding I do , as that is the goal of regearing , to put the usable power where you need it most , so if you are finding you need to shift down a lot , then you need to gear down till you can hold that gear throughout most of what you are riding ....The video below shows what correct gearing for the type of riding does , this is at Sagehen Reservoir near Smiths Ferry , above Boise ..
This would be the riding areas I normally ride (its a old GoPro video before I had a HD version , so quality is crappy) , but this is what I mainly ride with my 06 X , along with even tighter stuff (this trail , to me , is not that tight , I ride much tighter stuff , this is just a fun trail to ride)
The first 4 minutes , is 2nd gear , then I went to 3rd in the open areas , but the majority of that trail is 2nd and 3rd gear riding with 13/52 , the only time I went to 1st was when stopped , then to get going