How do I safely generate scripts for an existing MS SQL instance?
Look into dbatools (which uses PowerShell to do everything imaginable)

simplifying disaster recovery with dbatools – dbatools

getting started – dbatools

command index – dbatools

As for dummy data - do you need to only copy schema/objects, or data inside as well and scrub/randomize?