F250 brake light and 4x4 low light come on, truck looses power

Trying to help my friend with his 2006 f250 3valve superduty 5.4. It’s been randomly loosing power(sluggish acceleration). Sometimes it lasts for a couple minutes, sometimes all day.
Usually, but not always, the power loss is accompanied by the 4x4 low and brake light coming on and the buzzer staying on.

The check engine light has been on for years. I just had codes read. Catalytic converter efficiency below threshold.

Things I’ve tried/checked. New spark plugs, checked all coil packs with an ohm meter, fuel pressure is good, vacuum Guage is at 20, brake fluid is full, all the injectors are ticking.

Any ideas to try next? Could the catalytic converter be causing this?

Yes.

Tester

I took the cats off and still ran super crapy.
Had a mechanic friend hook up his $4000 Computer but didn’t find anything.
Its not actually in 4x4 when the light comes on.
I also noticed the tow haul şhuts off when the buzzer comes on.
Possibly related, a couple times lately after coming to a complete stop, there is a clunking sound. It lasts a few seconds and is pretty violent. It kind of sounds like gears grinding, or a fan blade hitting something.

a 2006 truck…sounds like an electrical problem.

Could be your cat is bad and your computer has some sort of failsafe tryna either save the engine or save the environment.

Another option is legitimately a clump of wires vibrating against metal…wore the protective film off…and it’s actually trying to engage/disengage components without all the neccessary circuitry, like only a few wires are actually grounding at a time.

I’d take it to a good mechanic.Just because he has a fancy computer doesn’t mean he knows what to do with it.