Cheapest HV AC detector
Anything that requires you to attach to the line is a hazard, even with an optocoupler. Dropping circuits are the worst. They're totally unsafe, for a number of reasons:

they bring line close to low voltage
they dissipate power
they have to deal with creepage
they don't protect from transients

Consider instead using a capacitive sensor, something like those cheap testers that pick up live voltage. Then there's complete galvanic isolation, certainly better than what you will have with the optocoupler. This requires no direct attachment to the line, only proximity to it, so all the insulation distance and creepage issues go away. It saves the cost of the optocoupler, and your board can be smaller owing to not needing the opto or the stand-off distance. So this meets your 'cheapest' requirement, by far.
This kind of a sensor is a popular and cheap hobby project. Example here: https://www.electronicshub.org/non-contact-voltage-tester/