We were at Disney for the 4th last year. Magic kingdom has their 4th of July fireworks on both the 3rd and 4th. So I’d personally see the MK on the 3rd and then Epcot on the 4th.
If you only have the 4th to go, Epcot’s fireworks, IMO, were better than MKs. They were probably the best fireworks I’ve ever seen honestly. It was truly amazing. We did a fireworks dining package at spice road table and it was great. I would do Epcot’s 4th show over MKs hands down.
ETA: I truly think that epcots fireworks are worth it. And in the park. Like you feel it inside of you. I would go back for the 4th just to see those fireworks again.