I'd think it shouldn't be that hard to probe the hood latch for resistance. Presumably there is a range at which the BCM turns the hood open lamp off, and that should be the same position the alarm for the hood sets. Seems that the values don't match and that would be causing the alarm to turn on.
Or it could be the connection itself. Pinched wiring and intermittent connection.
Back probing it should be easy enough.