2011-2019 Explorers are a physical direct swap. The wiring in the Flex would be closest to a 2011-15 Explorer. I would have to look at the plug diagram to see if the plug is the same.
Short answer is physically yes but Electrically no.
Short answer is physically yes but Electrically no.