You need to have the ECM (engine computer), not the PCM, checked for trouble codes. You will then know what to diagnose.
Is the engine running ? no
A dodge pickup 1500 would stall out while driving because of a defective air filter.
fuel pump
When your truck loses power, the ABS system loses power.
Clean them and see.
It may be over heating,check out your rad hose. There are many things that can cause low power: weak fuel pump(check pressure), sensor malfunction ( codes ) ,charging system malfunction, transmission shifting issues, brakes dragging.
The # one problem with today's cars is fuel pumps ; this sounds like one.As the pump gets warm,it loses power. Do have it checked out.
It most likely has a plugged catalytic converter.
when driving it loses speed/power what causes this.
Vapor lock!
Don't know if this will help or not but I had exactly the same problem with mine and it turned out that the fuel pump needed replacing.
Go to a parts store and buy a can of CRC MAF cleaner. Clean the MAF sensor.