If you are using Cycles, there is a Pointiness attribute to a Geometry (shader) Node that can detect and highlight harsh angles representing "edges". This only works in Cycles and does not work in EEVEE, unfortunately, and will not always give you the result you want (it can often depend greatly, and sometimes unintuitively, on the angles of your desired edges).
I suggest first testing it by connecting the value through a ColorRamp directly to the Material output and adjusting the sliders until you can see what it's doing (as you can see from my image the sliders generally need to be very close together to isolate only "thin" areas).

If you think it catches the edges the way you like, you can then go ahead and use it as a Mix Factor between your Panel Material and your "Grime" Material:
