This is not a very usual problem but many daily drivers may have encountered it. The situation where the car develops on short notice this issue is not that often and it can have some precise causes. I have encountered this problem on every type of engine and I have some advice regarding the detection of the the causes and ways of repairing the car on site.
For naturally aspirated petrol engines: the problem of suddenly power loss can be caused by two things. The first one is related to the fuel lines or the fuel pump. If the fuel lines or the fuel filters are clogged or if the fuel pump is not working properly you can feel some power losses. This problem can be solved very easy by changing any of those components. For this type of engine, another cause can be some malfunction of the timing belt. The timing belt connects the engine to the distribution system that ensures the intake and exhaust processes. In some cases, the timing belt can jump a teeth or two. The engine doesn’t break immediately for normal engines but you will feel a sudden power loss and a strange behavior of the engine (strange metallic sounds, lights on the dashboard). In this situation, the best advice is to stop using the car. Any wrong alignment of the timing belt can destroy in time the engine. Stop using the car and ask a specialist.
For turbo engines (diesel or petrol): the problem of suddenly power loss can be caused by the turbine. To be more specific, the problem can be caused either by the hose that drives air from the turbine to the engine either by a vacuum hose. The problem with the first hose can be caused by some cracks or simply because of the loss of connection between the turbine and the hose. To solve this problem change the hose or fix it back in its place. The problem with the vacuum hose can be solved either by re-attaching the hose in its place either by replacing the hose. Vacuum hoses work under extreme low pressures and the fatigue is very acute. The advice is to change all the vacuum hoses every 2 or 3 years. Many sub-systems of the car work by vacuum (braking system, turbine, some sensors) and it is important for your safety that they work properly. If you can’t find the correct vacuum hose, listen to a suction noise and follow the hoses around the turbine and the brake system.
Let’s hope that you won’t encounter this problem in the near future. But if you did, now you know how to solve it.