Intermittant Shaking/Shimmying on 2004 F-150 4X4

I have one of those periodic, but mystifying, intermittant problems with a 2004 Ford F-150 4X4. At 47,100 miles, I noted that the vehicle at speeds ranging from 30 to 40 mph, shook/shimmied while driving straight ahead under normal acceleration or coasting at those speeds on smooth road conditions. I took it to the shop, and they determined that I needed a right outer tie rod end and spindle rod replaced. This was done. Problem disappeared for a few days, and now it is back. Could it be a driveshaft/u-joint problem? Brakes all around were done 6,000 miles ago. Would a periodically sticky caliper be a possibility? Any advice particularly that would account for intermittant nature of problem would be appreciated.

U-joints are simple to check all you have to do is crawl underneath and try to move the joint up and down and sideways.

While you’re there check the driveshaft for a missing balance weight.

Another possibility may be from a tire separation.

When was the last time you rotated your tires? Exwife had same problem. Had her get rebalance and rotate tires and problem is gone.