Can I use a gutted sub panel as a junction box
You don't need to do that -- you can get a flush-mount box by itself that fits your needs

What you're looking for isn't a "breaker panel", really.  It's just the cabinet that the breaker panel came in, so just get a suitable box instead.  The term you are after is "flush mount NEMA 1 enclosure", and it will look something like this (illustration and link for exposition only):