Hello, I hope the following is of assistance.
From the description you've given this would certainly appear to be a case of a misfire which can be due to failing spark plugs but there are a couple of points to check along with the spark plugs.
When you check the spark plugs check for any sign of water in the recesses in the cylinder head, if there is water in these around the spark plugs then check the coolant level, if this is low dry all the water and run the engine then recheck for water, if there is water then it may be the core plugs in the cylinder head that are between the spark plugs are corroded allowing coolant to escape.
If the coolant level is OK but there is water around the spark plugs then check the screen washer jets, there are rubber gaskets on these where the jet seats on the bonnet, if there is no gasket or it has gone hard then rain flows through onto the valve cover and the water builds up enough to leak through the CHT grommet and into the spark plug area.
If there is no sign of water around the spark plugs then the ignition coil output needs checking, it's very common for the coil pack to fail causing a misfire, around 75% of the time it is cylinder 4 that has no output.
As there is a misfire and the MIL flashes you need to repair this as quick as you are able to as a persistent misfire will cause catalyst damage which is quite expensive to replace.
I hope this helps but if I can assist further or if you have more questions regarding this let me know and I'll reply as soon as I'm able to.