in fact it's not clear that she ever really understood the difference engine/analytical engine at all

I'd be interested to see some proof for this assertion. The article you provide a link to, while interesting, contradicts your assertion in quoting several who have studied her, and Lovelace herself, who foresaw many applications for it and added copious notes to her translation of Bernoulli:

Many persons who are not conversant with mathematical studies, imagine that because the business of the engine is to give its results in numerical notation, the nature of its processes must consequently be arithmetical and numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine its numerical quantities exactly as if they were letters or any other general symbols; and in fact it might bring out its results in algebraical notation, were provisions made accordingly. It might develope three sets of results simultaneously, viz. symbolic results (as already alluded to in Notes A. and B.), numerical results (its chief and primary object); and algebraical results in literal notation. This latter however has not been deemed a necessary or desirable addition to its powers, partly because the necessary arrangements for effecting it would increase the complexity and extent of the mechanism to a degree that would not be commensurate with the advantages, where the main object of the invention is to translate into numerical language general formulæ of analysis already known to us, or whose laws of formation are known to us. But it would be a mistake to suppose that because its results are given in the notation of a more restricted science, its processes are therefore restricted to those of that science.[1]

Given that Lovelace wrote the most comprehensive notes on the engine (quoted above), and was the first to publish an algorithm for the engine in collaboration with Babbage, it seems highly unlikely that she didn't understand it. Furthermore, she saw farther than Babbage in outlining its use for general computation rather than strictly mathematics (as outlined in the quote above, and in the article by jgc).

Doubtless some people have exaggerated her role (though frankly I think more people have tried to put her on a pedestal only to knock her down), and perhaps she doesn't deserve the title of 'first programmer', however we don't really know for certain the balance of their relationship or her full role, and I think it's fair to say that she understood the engine given her extensive notes on this translation and work with Babbage.

Here's what Babbage had to say about her contributions:

I then suggested that she add some notes to Menabrea's memoir, an idea which was immediately adopted. We discussed together the various illustrations that might be introduced: I suggested several but the selection was entirely her own. So also was the algebraic working out of the different problems, except, indeed, that relating to the numbers of Bernoulli, which I had offered to do to save Lady Lovelace the trouble. This she sent back to me for an amendment, having detected a grave mistake which I had made in the process.[2]

He makes it sound like they collaborated and swapped ideas on the notes, and she corrected an error in his algorithm - maybe they deserve credit for pair programming too :)

[1]http://www.fourmilab.ch/babbage/sketch.html

[2]Passages from the Life of a Philosopher, Babbage