The simplest way to detect if an engine is running would be to check the battery voltage. If it's ~13.8V, then the alternator is spinning, and the engine is running.
And vice versa, if the battery voltage is at ~12.6-12.8 ish volts, then the engine is turned off.
The charging voltage can vary slightly between alternator manufacturers. Alternator wear could, potentially, also make the charging voltage drift a bit. The safest bet would be to measure the voltage across the battery terminals when the engine is idling, and use that measurement in your project.
Nice and simple wire hookup, at least.
Using the oil pressure sensor could potentially give a "false positive" feedback, because they're generally set to latch at 0.8 bars, which isn't a lot. Cranking could easily set it off.
Using the charging voltage wouldn't give such a false positive, as the starter motor draws the battery voltage down when it's cranking.
-MightyTwin.