TITLE: Zariski's main theorem for non-representable morphisms?
QUESTION [6 upvotes]: Let $f:\mathcal{X}\to \mathcal{Y}$ be a separated quasi-finite map of qcqs Deligne-Mumford stacks.  Is there a version of Zariski's main theorem that makes sense in this context?  Rydh proved a version of this in the case where the map $f$ is also assumed to be representable, in which case we recover a stacky version of the classical factorization of $f$ as the inclusion of an open substack into a finite stack over $\mathcal{Y}$.
Obviously we can't hope for exactly such a factorization, since this would make $f$ automatically quasi-affine (and therefore representable).  But I was wondering if maybe there is a factorization of $f$ into something like a (locally constant?) gerbe over an open substack of a finite stack over $\mathcal{Y}$.

REPLY [5 votes]: You can take the relative coarse map to get a factorization of $f$ into $\mathcal{X} \to X \to \mathcal{Y}$ where $g : X \to \mathcal{Y}$ is representable and $\pi : \mathcal{X} \to X$ is proper + quasi-finite with $\mathcal{O}_X \to \pi_*\mathcal{O}_{\mathcal{X}}$ an isomorphism. Then you can apply the representable case of ZMT to $g$ to obtain a factorization
$$
X \hookrightarrow \overline{X} \to \mathcal{Y}
$$
where $X \hookrightarrow \overline{X}$ is an open immersion and $\overline{g} : \overline{X} \to \mathcal{Y}$ is finite.
Putting this together, we get that any such $f$ factors into
$$
\mathcal{X} \xrightarrow{\rho} \overline{X} \xrightarrow{\overline{g}} \mathcal{Y}
$$
where

$\overline{g}$ is finite and in particular representable,
$\mathcal{X}$ is proper + quasi-finite over an open substack $i : X \subset \overline{X}$, and
$\rho_*\mathcal{O}_\mathcal{X} = i_*\mathcal{O}_X$.

I think conditions $2 + 3$ can be replaced by something like $\mathcal{O}_\overline{X} \to \rho_*\mathcal{O}_\mathcal{X}$ is injective and integrally closed.
The existence of the relative coarse space is guaranteed under your assumptions by Theorem 3.1 here. Indeed the relative inertia stack is proper over $\mathcal{X}$ by the separated assumption and quasi-finite by the DM assumption.
I think by universality of the relative coarse map this is essentially the best you can do. In general the kernel of the map on inertia can jump so I don't think you can expect the first map to be a gerbe over an open substack, e.g., if $f$ itself the coarse space of a separated DM stack that is not a gerbe.