I've been bagging guns for over a decade now.
The obvious issues for firearms are that any sharp edge will create a stress/wear point on the bag, and the pattern on non-chamber sealer bags ( needed to allow the air out of the bag) transfers onto the bluing (I think through oil polymerization) leaving a pattern that must be cleaned off.
They are both solved by putting the firearm in a "bore store" type sleeve and vacuum bagging that.
The theoretical issue is that those bags may be oxygen permeable. I can't help thinking it would still be better than open air exposure, but it isn't necessarily a guaranteed long term rust stopper.
Using a bore store and a good vacuum bag, plus an outer case, I've had guns vacuum packed for 10 years come out of wraps looking/working as good as the day they were sealed. Including black powder guns.
I've bagged a lot of ammo, mostly to de-rattle the containers. Never had an issue beyond sharp edge punctures costing the seal. Ammo lasts forever either way so it is hard to claim it extends the service life, but it does keep the brass shinier.
I do not recommend that for the only protection on burial. You need an outer vault designed to deal with a water table, buoyancy, and all that jazz.