"Indeed" can start a sentence as either a conjunction or an interjection.
As a conjunction, indeed provides emphasis or indicates that the sentence is an example of, or evidence for, a claim made in the previous sentence.
As an interjection, indeed indicates surprise or sarcastic doubt. In this use, indeed is often the only word in the sentence. He thinks she'll marry him? Indeed!
In formal writing, the use as a conjunction, to mean the same thing as "for example" is perfectly acceptable. That was precisely the way you used it. Just don't use it too often or it gets tedious. If "for example" is starting to get tedious, switch it up with an "indeed".