You can disable identity cache like Posflow suggested and deal with the possible performance hit.
For the ticket number, I don’t think it’s possible as it stands. There’s also the issue of splitting/merging tickets that can cause gaps as the old tickets are delete instead of just cleared (iirc).
You can show the tax guys these threads, one for SambaPOS and one for SQL Server: