Sadly, your scenario is a distinct possibility in Mass. Activist judges/DAs really do invent "law" where no such thing exists (like our AG also) and push their political agenda unless there are expert witnesses who can convince a judge/jury otherwise by reasoned replies refuting the BS. The case I got involved in was a real eye-opener to me as to how far a DA will go to throw the book at someone with NON-EXISTENT laws.
The more you handle a loaded gun especially in a car, the more opportunity for a ND. It is a lot safer not to unload. However, we really don't have a definitive court ruling that allows this, so Mass-prudence dictates that we unload.
No law requires a separate container for ammo/mags. However see my first response above. DAs can make up law and unless someone has the money and foresight to get an expert witness to refute it, a judge/jury will likely convict. As noted above, some charges are often pure BS and leave it to the accused to worm their way out of it.