“The latest crop of mangoes was filled with worms.”
Just from my experience with growing apples, cherries and peaches, you probably need to spray or trap a certain fly that is laying eggs in your mangoes at the right time in their life cycle.
Up here in Wisconsin was have an Apple Maggot Fly that does that to apples, but you can spray when your apples are the size of a quarter, or hang red (the color attracts them), sticky traps to trap that particular fly.
If you have fruit, the pollinators have already done their thing, so spraying at that time won’t harm anyone but the culprit you are after.
I’d ask others in your area what they do to prevent that.
P.S. So jealous that you have mangoes! My fondest dream would be to have my own Avocado tree...but I don’t want to move to any of the states/countries where I can grow them, LOL! :)
The tree is 45 feet tall and is near a neighbors house so I can’t really spray it