Technically doable - but will depend on the motivation and competence of the check-in staff at JFK.
It's much more likely the bag will just follow you to MUC and then go back to DXB

Although if they are clever they will find a way of making it transit at DXB for a longer period of time.