Any missing number in your sales order table (gap) is a missing number
But more importantly why do you need to track this? That number gets automatically spun up any time an order is created including any accidental clicks or tests orders
You could enable the change log AND a BPM to prevent the deletion of the header record.
Just implementing the change log wouldn’t work, because the change log records are deleted when the record they are logging against is deleted. Disabling the ability to delete the records, would then force users to manually close/void the PO or SO. And that process would be captured in the change log.
@prakash wrote a customisation for closing sales orders which a reason code. And blocked deletions. and a report to analyse why sales orders were closed.