Yes there is a way and many people already accomplished this (including me) by publishing the now called G Suite Add-ons. For details please read https://developers.google.com/gsuite/add-ons
I already mentioned two of my add-ons here on Web Applications, Record Viewer and Spreadsheet Freezer.
In Google Sheets: How do I merge a range of a row ...
Here, Finally, I found this:
"Workaround for Google Docs Page Numbering Problem to Start from a Specific Number" https://www.youtube.com/watch?v=2cGSqiKZ3wI
Simply just create a word that contains paging start from a specific number and then upload it to Google drive.
You can use https://writer.zoho.com/writer
Select one paragraph above the paragraph in focus, the paragraph in focus and one paragraph below
Cut (keyboard shortcut Ctrl + X)
Paste as plain text (keyboard shortcut Ctrl + Shift + V)
Apply text formatting as needed.
One workaround solution that hasn't been mentioned here is using Google's "Version History" feature to name a specific version. While that won't exactly lock your file down, it will give you an easy way to restore the version you want if it ever changes.