Let $f:S \to B$ be a genus $g$ fibration ($B$ is a smooth projective curve, $S$ a smooth projective surface and the general fiber $F_b$ of $f$ is of genus $g \ge 2$). I would like to ask some references on the scheme $X \to B$ representing the functor $(Sch/B)^{opp} \to Sets$ mapping $C \to B$ to $Isom_C(S\times_B C,S \times_B C)$. (It should be representable as the subfunctor of a suitable Hilbert Scheme).
In particular I am looking for a result on the finiteness of $X \to B$ and on the structure of $X_b$ (in particular do we have $X_b=Aut(F_b)$? I think yes or at least this is not obviously false to me since $Hom_B(F_b,X)=Hom_B(F_b,Aut(F_b))=Aut(F_b)=Isom_{F_b}(S \times_B F_b,S \times_B F_b)$).
I need this to prove the following fact: if the general fiber has automorphism group $Aut(F_b)=\mathbb{Z}_n$ then up to base change (to a smooth projective curve $B' \to B$) we have $\mathbb{Z}_n \subset Aut_{B'}(S)$. If I didn't make mistakes, this should follow by taking $B'$ minimal over the connected components of $X$ and the compatibility of the the $Isom$-scheme with base change. If needed somewhere I may suppose to work over $\mathbb{C}$ and to have stable fibers (this seems necessary in order to have $X \to B$ finite, as suggested in the comment)
Thank you in advance