You can delay when autostart.sh runs, but you cannot control when it finishes or the sequence with Kodi start.
If you move commands to a systemd .service file in /storage/.config/system.d/ you can control the sequencing, e.g.
Code
[Unit]
Description=EPG Download ServiceAfter=network-online.target nss-lookup.target
Wants=network-online.target nss-lookup.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/wget http://XXXX:XXXXX@XXXXX/guide-zatoo.xml -O /storage/.kodi/userdata/guide-zatoo.xml
[Install]
WantedBy=multi-user.target
Display More
I won't guarantee this ^ will work as I'm no systemd expert, but "After=network-online.target nss-lookup.target" ensures the network is up, and then "WantedBy=multi-user.target" ensures it runs before Kodi startup.