i don't think the pedal business is tanking. look at how many companies there are. i think part of the issue with T.Rex was down to management and growing way too quickly. to some extent the same thing happened to EHX in the 80's when they declared bankruptcy, and reopened in russia. even better look at gibson right now. one of the most influential guitar companies in the history of music was completely mismanagement and trying to turn it into a lifestyle company.
i think the "boutique" market is still strong, even with stupid cheap chinese pedals hitting the market. what i see, not just cause i sell pedals based on order, that many people when they start playing and want a pedal they get whatever's cheap and "fits" some category of pedal (OD, Distortion, Fuzz, Delay, etc.). But, as people get better they become more picky and look for something that's in there head and think about quality rather than price. think about when most start playing you don't go out and buy an expensive guitar, you get something cheap to learn and work up. you can apply the same thing to cars or audio equipment or really anything.
Marbles makes a good point about YABM, but the same can be said for YAFF or YATS. i think that's also a big part of the issue. the other issue is miss information and i'm not just talking about from regular players by JHS for instance has a video on their youtube page about "Myths" of guitar pedals, most of which he's completely wrong. sites like TGP are a big part of the problem in spreading miss information IMHO, because it's the first place people find info about music gear.
btw, i read an interview with the guys of T.Rex about the bankruptcy and they're not going away. basically they declared bankruptcy due to the amount of debt they have and the bankruptcy wipes it away and they restructure. i do wish they good luck and success, they make some great stuff.