Working the Bag of Holding into your proposed scenario
A more descriptive (yet ridiculous) name for "Bag of Holding" would be "Travelling Portal to Airless Demiplane Storage", or TPADS for the hip kids out there.
I suggest this because my interpretation of the Bag of Holding is that its mouth acts as a portal into a 64 cubic-foot demiplane. When you open the mouth of your nifty Bag/TPADS, you open the portal, and you can use your action to retrieve a single stored thing via fancy magics which prevent you from bumbling around, grabbing stuff indiscriminately. When the mouth is sealed, the portal becomes inactive, or at least blockaded.
Why a demiplane instead of Astral Plane? Because whenever, as a result of damage or conflicting magic, a TPADS' contents are disrupted and need a place to go, and they go into the Astral Plane, then they probably weren't there to begin with. Otherwise you'd have a bunch of storage-locker bubbles floating around the Astral Plane, being knocked around by Gith slave-ships like billiard balls ("Dude, Where's My Astral Bubble?"). Hey, it's better than annihilation.
The suffocation of creatures inside the bag was intentional
The devs anticipated placing creatures into your handy TPADS, and so created the parameters for suffocation [DMG p.154] while within its confines, perhaps unintentionally encouraging munchkins everywhere of its use as the lazy adventurer's alternative to waterboarding. Presumably, a creature(s) which requires no sustenance whatsoever could survive the demiplane indefinitely, as is inferred by the rules for breath-sharing (Bag o' Zombies - Beware!). The inclusion of suffocation rules infer that creatures trapped inside cannot escape due to an interplanar barrier blocking airflow and most likely light and passage as well.
But That's Boring
You can't TPK a party with ancient accursed-armor, grimed by generations of malice-crust, if it's eternally imprisoned at the mercy of the adventurers!
How would a fully-immersed, unwillingly trapped creature escape from
within such an anaerobic demiprison?
What if an overly-ambitious party of adventurers attempt to Trojan Horse a Lich with a TPADS marked "499 lbs. of milk & cookies!", ignorant of the Lich's disdain for dairy and confectionery (classic n00b error), and its subsequent dismissal of the gift?
The description of this item only mentions what happens when exterior forces are enacted upon it. I shall provide two explanations in favor of escape, because OP's encounter idea of PC's being ambushed by their own backpacks needs to happen early and often (queue evil DM laughter). These scenarios depend upon how you envision the interior portal, although you'll have to use your mind's-eye because there's no light inside a TPADS.
- The interior portal is in perfect syncopation with the dilation of the exterior mouth - opening / closing in real time; the circular hole can be reduced but never eliminated.
In this scenario, a creature could manipulate the interplaner bunghole from the inside out, much like a toddler rogue-in-training would do after becoming trapped inside her parents' footlocker. Whether or not this requires high-level conjuration-based travelling spells, or more mundane methods, similar to firemen spreading open a busted elevator compartment, is your option. Just make sure to solicit at least one pizza-bribe before making a final ruling.
- The interior portal operates as more of an on / off magic gateway thingy (poof!); the portal may only be activated from the exterior of the TPADS. Because of the precautions taken by the sagely TPADS wizard-engineers (aka Wizgineers (TM)) no amount of effort, magical or otherwise, may affect the portal as long as it originates from the within the interior of the demiplane.
Under this interpretation, the trapped creature would have to lie in ambush, awaiting the portal's activation, triggered by the external mouth being unsealed. Whether the in / out portal activates from the exterior mouth being fully opened or merely incompletely closed is yet another delicious pizza-bribe opportunity (and I don't want to bias readers by only including pizza in select answers)
Possible Complication
Now, I know what you're thinking about #2, or at least what your players will whine about.
Didn't said Wizgineers (TM) design the TPADS so that my character never touches the wrong content(s) - something can't touch me unless I want to touch it, can it!?
And to this, I say: probably! Most Wizgineers (TM) are as concerned about product liability as the next magitechnophile. Thus the most accurate way to do #2 (huh huh) is to wait for the adventurers to voluntarily reach for their own doom before TPK'n them - MUAHAHAHA!
Or, you can just rule that everything inside the bag is in a pile, and just because the thing you want is on the top every time doesn't mean that something mobile can't move into contact with the reaching arm. Perhaps the cursed armor floats near the portal, preparing to dash outward or lay a latent curse upon any arm foolish enough to enter its sacred domain. To arms!
{note2self: place Bag of Holding in dungeon filled with traps, hazards and/or curses and cackle mischievously when party turns it inside out}
TL;DR
Malice-encrusted bunghole is the lazy adventurer's alternative to milk & cookies