How to set headers and page numbers with alternating text on even and odd pages?

You can define the header struct in the header parameter of page. From your example right now, you have

context {
  if calc.odd(here().page()) {
    align(right, emph(hydra(1)))
  } else {
    align(left, emph(hydra(2)))
  }
}

which gives you alternating chapter/section header.
If you want a struct more like title | #, then you can use

context {
  let h = (
    counter(page).display(),
    h(1fr),
    hydra(1)
  )
  if calc.odd(here().page()) { h.join() } else { h.rev().join() }
}

which will give you alternating page number/ title.

That’s as simple as using

#set page(numbering: none)

when you don’t want any numbering! Once your chapters start, you can re-enable numbering.

I don’t think it’s possible to detect blank page? Except if you introduce one with a hard pagebreak(). In which case, you can set page numbering to none before breaking the page and re-enable it afterwards.