I have the same issue with my 2011 MKX. The dealer said it's the "hydraulic control unit" or ABS. The valves inside apparently stick open and allow some fluid to be diverted into the ABS block instead of putting all to the calipers causing the pedal to go to the floor. I decided the $1900 they wanted to fix it was two high and looking at replacing myself. Toughest thing appears to be removing the unit due to tight wrench clearance for mounting bracket. If I can't get it out I'll just take to my regular mechanic. The ABS block with the valves is around $350 online and another ~$350 for the ABS controller. If anyone has seen a video or pictures of disassembly please let me know. Here's the Youtube explanation.
Not sure if this is the issue but something I found with my car having a similar issue, not as severe as yours though. https://ford.oemdtc.com/2280/13n02-extended-warranty-coverage-on-brake-booster-2010-2013-ford-edge-lincoln-mkx