What are the dangers of hidden boxes?
I have heard and even participated in lengthy debates on this subject.  The code is very clear, and the difficulty in maintenance and troubleshooting is of course easy to see.
Many of the arguments go down the path of, &quot;Aren't there other things permitted in the code that are just as likely or more likely to create a hazard?&quot;  But that's not the question here.  The question is, what is the actual hazard created?
The same box and the same splices with the same connections in the same wall
with an accessible cover plate is compliant;  a layer of drywall over that cover plate and it's no longer compliant.  How does the layer of drywall over the box make it more hazardous?
In fact, you can put a box in between the joists above a recessed light where you can get to it by removing the light.  That's considered accessible.  How is that more hazardous than the same box between two studs?
The answer is, it is not inherently more hazardous.
Don't do it;  it's still against code, and still a bad practice; but it's not inherently dangerous.