My car does not start with the clicking sound and occasionally shut off while running

I am driving 01 Dodge Intrepid with 85Kmi on it.

From a month ago, occasionally my car had made clicking sound when I tried to start. When it happened, after waiting 5 minutes or so it started fine.

One week ago, my car didn’t start still with that clicking sound and bright head lights. I didn’t check it went dim when I tried to start the engine. However, I could start it with jump and went to the mechanics and replaced the battery and cleared the battery connection. They said the charging system was OK.

It had ran great for 1 week. Yesterday morning, after a 2 day trip of 400 miles and overnight stay, it started with no problem. I drove it to the Post Office for 10 minutes. Turned it off for 5 min and tried to started it but it wouldn’t. Tried a jump and it started OK. I drove directly to the mechanics. While I talked to the mechanic, I left my car idle. When I got back to my car to haul it in to a bay for a checking, I found that it shut off. Jump started it again and they tried to check the battery but it could not be completed since the checking station resets for some reason. So I made an appointment and drove it back to my home. On my way home, after couple of minutes of driving, the engine shut off while running and come back right away. I think it came back because it was running. At the next red light, it shut off again. Had to get it towed back to the mechanic’s parking lot.

I feels like it is more of a electricity problem thatn faulty starter. What could it be the reason?

You have a massive voltage draw (Short) somewhere in the electrical system. If all symptoms disappeaed after the shop replaced those charging system components, then I would say that the sort is probably somewhere around the battery, or on the main power wire going from the battery to the starter - might even be a loose connection at the starter. I restore old Muscle cars and sudden dieing happened when I was trying to sell one after restoreing. I checked everything within the ignition, carburator but had no luck. One day, on the side of the highway, I lifted the hood and began to work on the car - I bumped the the starter wires and suddenly saw where the battery cable was shorting out on the frame. I rewired the starter wires and have never had a problem since.
But…have you realized the obvious yet? If this is the problem then that shop sold you a bunch of stuff that you didn’t need.

Well, it turns out to be a hair crack at the battery cable post. They changed it for me without a charge. I changed only the battery, which I should change at some point of time. So it has not been that bad except the part that I stranded on the road. Anyway, thanks a bunch for the answer!