It's very straightforward: Taking even money on the natural is mathematically equivalent to taking insurance (you can easily work this out for yourself). "Insurance" is kind of a misnomer, or marketing hype; you're not "insuring" anything, you're simply betting that the dealer has a ten card in the hole, nothing more, nothing less. People get the idea that they should "insure" a 20 or a natural, but not a stiff. Completely wrong idea, you're just betting on the hole card.
That being said, the optimal play for insurance is easy: Never take insurance, unless you're counting the cards.
If you make the mathematically best play on every hand, you'll do well. What happens on any single hand doesn't really matter, nor does hindsight ("see, I should have hit my 18...").