Where does Safari store the homepage URL?
Solution 1:
In older Safari versions you could set it via defaults write com.apple.Safari HomePage -string "http://example.com"
. Safari seems to have done away with that at least since MacOS 10.11 (and possibly earlier). From this device management thread it looks like it's stored in iCloud, but in a rather opaque way.