Does anyone have a way where the 2 components can be enabled via scripting?
The first component is System Prefs -> Sharing -> Remote login, with enable allow full disk access for remote users and allow access for on these users checked?
The second component is System Prefs -> Sharing -> remote management where in option everything is checked except show when being observed?
Remote management cannot be enabled remotely via script. Please refer the below article on the same
You can refer the rtrouton's github to enable remote login.