The aircraft might not know which way is up, but the CofG certainly does
Yes but unfortunately the C of G doesn't know how to communicate this to the aircraft in a useful way.
Lateral stability is about the reaction of an aircraft to sideslip. If the aircraft slips right, the mechanism of lateral stability produces a roll to the left and vice versa. The roll angle of the aircraft with respect to earth vertical is not relevant.
Dihedral is one mechanism for lateral stability, as is a high wing. The latter has nothing to do with pendulums, but is caused by the interference between the fuselage and the wings when a sideslip is present.