What you're asking for already exists. The certbot package already takes care of that [1]. No need to develop anything extra for nginx.
[1] https://certbot.eff.org/lets-encrypt/ubuntuxenial-nginx
The most sustainable and reliable long-term approach would be to have Certbot's integrations gradually superseded by supported official Let's Encrypt integrations in applications that terminate TLS.
P.S. Thanks for your enthusiasm for Certbot!
e.g. a config setting get-certs-from: ACME-ENDPOINT-URL rather than a binary "Use Let's Encrypt" feature.
Thanks for your work, which is much more important than our enthusiasm.