As I see it ... how can you tell that there is a junction box behind the hood?
I can see myself looking into the wiring compartment, seeing a 'dead end' ....then spending hours looking for a hidden junction box.
It's bad enough if the box was used just to extend a pigtail - but if the wires also go off to other places, I see a real nightmare brewing.
IF I had to address such a situation, I'd probably try to follow the wire back, to a point where a box might be a little more 'find-able.' Say, by adding a receptacle inside that upper cabinet, or a 'clock receptacle' near the ceiling.
The topic is a bit dear to me at the moment .... recently I spent DAYS running down the faults in an older trailer. Who would have thought there was a receptacle behind the built-in GAS oven? (Yup, the oven - there once was a timer and a clock as well as a light - was the culprit).