Why did they used to write apostrophes in place of silent e's?

If you look at writing from the 18th century and sometimes later, it seems common to see aprostrophized e’s that we would generally consider silent, in this way:

caution’d
ev’ry

Why did people do this? Was there a time when those e’s were pronounced, then became contracted in speech, and people apostrophized them to mark the contraction, or something?

I hear, and sometimes myself pronounce, the middle “e” in “every”, especially if I’m enunciating or emoting. Like, if I’m mad, I might say, “It happens EVERY. SINGLE. TIME.” And pronounce the middle “e”. Like “eh-vuh-ree”.

The other one though, that’s a head-scratcher.

The -ed suffix used to always be a separate syllable. When it started being pronounced as one, the apostrophe was to note that omission of the sound.

Romeo and Juliet, Act V, Scene 3.

The ground is bloody; search about the churchyard:
Go, some of you, whoe’er you find attach.
Pitiful sight! here lies the county slain,
And Juliet bleeding, warm, and newly dead,
Who here hath lain these two days buried.

Ten syllable line, ending with a three syllable word.

“Bur-y-ed”

Exactly. Note this facilitates the rhyme with “dead.”

(Also, incidentally, the first line in that excerpt has eleven syllables, not ten, which is an acting cue to the performer; but that’s outside the context of the OP’s question.)

As I understood, the apostrophe marks a spot where there is a stop in place of the letter (vowel or consonant). Ev’ry would be “Ev…ry” and whoe’er would be “who-eh..ehr”. As that post points out, it also appears to be a device to ensure proper pronunciation in multiple sylables (or fewer?) when included in a poetic meter. Seems similar to the glottal stop in Inuit names written with an apostrophe (which I have to assume was conceived by English speakers attempting to write the lanuage).