While possible I find it difficult to imagine the trailer brakes causing the truck brakes to fail. But on the surface it does sound like brake fade from too much heat.
When you say this occurred on a flat road, had you been on that flat road for a while or had you just come down out of the mountains.
In your estimate what was the time gap between the last successful or normal feeling application of your brakes and the brake application where you had to press really hard? If you were in traffic and constantly having to touch the brakes prior you might have overheated them.
Which foot left or right do you typically use to brake? I have known some people to use their left foot to brake and they inadvertently rest their left foot on the brake pedal. While they think they are not applying the brakes they usually are and it results in very rapid break wear and heat.
Were you pumping the brakes even lightly before you stopped? I don't know your braking system but on many vacuum boosted hydraulic braking systems it is possible to press the pedal to the floor. To do this you typically have to press slowly but hard on the pedal for a few seconds then lift your foot a bit but not all the way and then press again. After a few cycles you will find the pedal very low if not all the way on the floor. But typically the brakes will be on very firmly at the end of this.
How fast were you going and were you in a panic stop situation or was this just a normal stop and it just felt wrong? I've had a panic stop from about 35 mph and I the the brakes hard and I swear nothing happened. Fortunately after what seemed like an eternity but was really probably only a half second the trailer brakes came on hard and we got stopped with about a foot to spare.
Is there a flat light traffic highway where you can try unplugging the trailer umbilical and try to reproduce the same braking? Just be aware that your brakes might suck and there will be no brake lights on the trailer to warn people behind you that you are stopping. If nothing else this will at least tell you if your tow vehicles brakes alone can safely bring your setup to a stop albeit with an increased stopping distance.