Ascending a slope puts significant strain on the engine. The throttle is in a more open position, allowing for a greater volume of air to enter the cylinders. Additionally, the compression pressure inside the cylinders is increased. A greater level of pressure, together with the breadth of the spark plug gap, need an increased voltage from the ignition coil in order for the spark to successfully traverse the gap. If the high voltage is able to establish an alternate route to the ground, such as via the spark plug insulator or by bypassing a plug wire, it will result in a misfire of the spark plug.
It is recommended to replace spark plugs after covering a distance of 50,000 kilometres. Begin at that point. To determine whether the issue is resolved, I would recommend replacing the outdated plugs. If not, it is possible that the issue is in the ignition coils, which might be malfunctioning. If the spark plugs have been faulty for an extended period, the ignition coils have likely been strained due to the need to provide high voltage for those malfunctioning plugs, resulting in impaired coil performance.
If the issue does not stem from an ignition problem, the next likely culprit would be a fuel pressure problem. Insufficient pressure or volume in the high pressure fuel injectors will result in unsuccessful combustion. If this were true, I would anticipate that you would have encountered fuel trim issue codes, which you did not specify.