How can I add a glow/embossing to text?

Stacking content on top of each other can be achieved with place but as you point out, it’s limited.

Here’s another way to stack things which keeps the location of whatever is being stacked:

#let z-stack(..contents) = (
  context {
    let max-width = calc.max(
      ..contents.pos().map(content => {
        measure(content).width
      }),
    )

    box(
      grid(
        align: center + horizon,
        columns: contents.pos().len() * (max-width,),
        column-gutter: -max-width,
        rows: 1,
        ..contents
      ),
    )
  }
)

#let shadow(color, num-layers, gap, content) = {
  let layers = range(num-layers, 1, step: -1, inclusive: true).map(l => text(fill: black.transparentize(100%), stroke: l * gap + color, content))
  z-stack(..layers.rev(), content)
}

#show regex(`[^\s]+`.text): shadow.with(black.transparentize(99.8%), 50, 0.01em)

= Heading 1
#lorem(5)

$ y = m * x + b $

`let x = 1`

This is a combination of your idea, and a variation of the solution to this post: