Using ハ for particle "wa" was a part of their proper style to write official documents or letters at that time.
The writing style of 日米和親条約 in your image is [候文]{そうろう・ぶん}, which was a formal writing style during the Edo period. If you would read other 候文 documents or letters written in the Edo period, you would notice that ハ is almost always used for particle "wa" in them, and は is almost never used for it.
For example, the following web page shows a 候文 document which is [人相書]{にん・そう・がき}(a criminal's description) used in 1746 ([延享]{えん・きょう}[三年]{さん・ねん}).
古文書解読講座 第11回 江戸の人相書 史料の解読と読み下し例
【東京都公文書館 / Tokyo Metropolitan Archives】
The handwritten characters in black are of the actual document, and each of the red characters represents the [楷書]{かい・しょ} of the black character alongside it. In the bottom part starting with (中略), there are a couple of ハ characters such as
[其身]{その・み}ハ,
[私領]{し・りょう}ハ.
They are all particle "wa".
You may find ハヽ in the document. ハヽ means ハバ in this case and is read "waba" which is composed of the okurigana "wa" of 候 and a particle "ba". This combination is also almost always written ハヽ. はゝ is almost never used for this kind of "waba" in 候文.
Using ハ for particle "wa" was very common not only in formal documents or letters, but also in various kinds of writings during the Edo period.
Actually, using ハ for particle "wa" was already common in the Heian period. So we can see them used in Emakimono such as Genji Monogatari Emaki (源氏物語絵巻) etc. But this answer focuses on the usage of ハ in the Edo period, because 日米和親条約 was concluded in the Edo period.
ハ or は of Preference
Under certain conditions, ハ was replaceable by は or other equivalent kana. The main conditions were:
- It's not the first character of a word.
- It's not a particle.
- It's not a part of a katakana word (such as a foreigner's name, some kind of exclamation, etc).
These are customary rules. So actually, particle "wa"s written with は exist, especially in informal writings of the Edo period, but it's very rare.
Here is an example of a replaceable kind of ハ.
The following web page shows the image of the first page of a book called [怪談御伽童]{かい・だん・お・とぎ・わらわ} published in 1772([明和]{めい・わ}[九年]{く・ねん}).
『怪談御伽童 巻一』Image 2
【書籍概要 / 早稲田大学図書館 Waseda University Library】
In the right page, there is the title of the book like this.
[怪談御伽童]{くハひ・だん・を・とぎ・ワらハ}
(I replaced some hentaigana with modern standard hiragana.)
The last character of the furigana([振]{ふ}り[仮名]{がな}) is ハ here. Then, please look at the last page of the same book.
『怪談御伽童 巻一』Image 21
In the right page, the last line is like this.
怪談御伽ワらは巻一終
童 is written ワらハ in the first page, but ワらは in the last page. (Both of them are read "warawa.") The ハ and the は are probably written according to the author's preference. And it seems acceptable for Edo-period readers, because this kind of ハ/は is found in many books written in the Edo period.
So, replaceable kinds of ハ existed, but a particle wa was not one of them.
Is the ハ Hiragana Or Katakana?
During the Edo period, people commonly used katakana in hiragana writings or kanji-hiragana writings. They seemed to try to improve readability by using katakana. Some Japanese words were almost always written in katakana even in hiragana writings or kanji-hiragana writings.
So it's possible that Edo-period people categorized ハ as katakana but still used it in hiragana contexts, although it's also possible that ハ used in the Edo period was thought hiragana and had a similar shape to katakana ハ like the modern standard hiragana へ and katakana ヘ.
There are some textbooks for children, published in the Edo period, in which ハ is categorized as katakana. However I've not found reliable sources in which ハ was categorized as hiragana during the Edo period. So I can't be sure about this matter, yet.
ハ used in the Heian period seemed to be hiragana because Heian-period people seemed not to use katakana in hiragana contexts usually. But Edo-period people commonly used katakana in hiragana contexts, so it's more difficult to discern their awareness of using katakana ハ or hiragana ハ. I think it's debatable whether ハ used in the Edo period is katakana or hiragana.
Anyway, the ハ is kana. And today, it's categorized as hentaigana.
If you are interested in how textbooks, published in the Edo period, are like, here is an example.
『大全童子往来百家通』Image 20
【書籍概要 / 早稲田大学図書館 Waseda University Library】
This image shows a part of a textbook for children, published in 1852([嘉永]{か・えい}[五年]{ご・ねん}). On the left page, there is a chart of katakana which contains ハ. Then, please look at the next page of it.
『大全童子往来百家通』Image 21
On the right page of the Image 21, there is the iroha poem (いろは[歌]{うた}) written in hiragana, which contains は. (The iroha poem was commonly used to learn kana.) The first two lines are like this.
いろはにほへと
ちりぬるをわか
Then, in the same page, please look at the inside of the box which contains a mountain landscape. The box also contains the iroha poem written in a proper practical style using kanji. The first line says
[色]{いろ}ハ[香]{にほ}へど[散]{ちり}ぬるを
(I replaced some hentaigana with modern standard hiragana.)
This teaches that は of いろは should be replaced by ハ when written in a proper way. This ハ is a particle "wa." I don't know if the author means the ハ is katakana or a variant of hiragana は, but anyway, he teaches that ハ is the appropriate character to use for a particle wa.
Edo-period children learned written Japanese with textbooks like this.
Hope that helps.