Wow...sorry to see that!
You probably need a professionals advice but I can share what I would do...
Clean off as much of the Dicor as you can. Take your time as it is not easy work. Almost looks like the EPDM was cut too short and you may have trouble stretching it back to the trim piece. I would treat the exposed wood with an epoxy sealer (
Restor-it), try to get the EPDM to lay as flat as possible and use a good adhesive, redo the trim with butyl and screws and use the Eternabond. Remember that the Eternabond will stick to the roof but if the roof is loose you will still have issues. I don't think I would worry about the EPDM not being totally under the trim as the Eternabond will stop the leaks if the roof is adhered well.
Can't believe that repair was done at an RV service center!
Best Wishes!