4 of 6 added 578 characters in body

Perl 6, 84 bytes

-2 bytes thanks to Jo King

->\n{(($!={$/=[^n];:10[map {|splice $/,$_,1},[R,] .polymod(1..n-2)]})(n+1)-$!(n))/9}

Try it online!

0-indexed. Doesn't enumerate all permutations. Should theoretically work for all n, but bails out for n > 65536 with "Too many arguments in flattening array".

The following 82 byte version works for n up to 98!-2 and is a lot faster:

{(($!={$/=[^99];:10[map {|splice $/,$_,1},[R,] .polymod(1..97)]})($_+1)-$!($_))/9}

Try it online!