The kinetic energy of the piston is not lost as the piston slows down. The kinetic energy is used to do work -- specifically, it does the work of moving the car along the road against friction and air resistance.
Consider a single-cylinder two-stroke engine. Such an engine would have a massive flywheel. As the piston comes down, it transfers its translational kinetic energy to the rotational kinetic energy of the flywheel. As the piston comes up again, the flywheel transfers energy back to it, and this energy is used to compress the fuel-air mixture. The fuel-air mixture is then ignited, and accelerates the piston downwards.
The piston slows down as it again transfers its energy back to the flywheel. The net result of the cycle is that energy is transferred from the combustion of the fuel-air mixture to the flywheel, and the flywheel then uses this energy to move the car. In a multi-cylinder engine, the crankshaft and the other pistons play the part of the flywheel.
The only way the kinetic energy of the piston would get wasted would be if it were slowed down by friction, rather than by transferring energy to the crankshaft/flywheel. There is some energy lost to friction, but it's very slight -- a few percent of the total energy transferred to the crankshaft.