Use Mermaid for Diagrams to make them easier to modify and discuss

The following discussion from !12117 (merged) should be addressed:

  • @theoretick started a discussion:

    nitpick: can we use mermaid for these? Then we can track the changes in code, comment on nodes accordingly, and edit them easily

    non-blocking follow-up