Thank you for your responses. Unfortunately the suggested script didn't solve this issue. Both ports eth0 and eth0.4 get the correct IP-addresses, even without the script. The DHCP server of the provider doesn't provide an IP-adress for VLAN4 without requesting the vendor option IPTV_RG.
For now i changed the network configuration. A managed switch is connected to the provider's network. The switch takes care of VLAN4, The setup box and the EdgeRouter are both connected to the switch and everything is working fine now.
However, I still believe that the Edgerouter should be able to handle this network configuration.