How to change the format of page numbers only in the outline (and skip the first few pages)

Change to what? With your current page numbering, you are trying to solve a different problem.

#counter(page).update(1) is fine.

Where what? What template? You include #show: template here. How can you import template from another function? Are you using currying or something?

If the template doesn’t matter, then you shouldn’t include it. Otherwise, include relevant parts. Your current example does not compile. See https://sscce.org/.

Is this the same question as the first one?

#set text(lang: "de")
#set pagebreak(weak: true)
#set heading(numbering: "1.1")
#show outline.entry.where(level: 1): strong

#align(center, text(35pt)[*Optimierung*])
#v(2em)
#outline()
#pagebreak()

#counter(page).update(1)
#set page(footer: context align(center)[\- #counter(page).display() - ])

= Heading
== Heading