You will need to write a server / client script to achieve the auto share functionality. On documents validate method you can share the document with a specific user.
To share the document you can use the
from frappe.share import add
add(doc.doctype, doc.name, user, read, write, share, everyone)
user: "user name"
// document is shared with user