Yes, all this is fine. Some people have been denied entry to the US when coming to the US even temporarily to marry a US citizen, so you will see advice online (even sometimes from immigration lawyers) saying that you need a fiancee visa for this purpose. But the State Department's Foreign Affairs Manual says that a B-2 visa is appropriate for this purpose:
9 FAM 402.2-4(B)(1) (U) Fiancé(e) of U.S. Citizens or Permanent Resident Aliens
(U) An alien proceeding to the United States to marry a U.S. citizen petitioner within 90 days of admission is classifiable as a K-1 nonimmigrant under INA 101(a)(15)(K). (See 22 CFR 41.81.) The fiancé(e) of a U.S. citizen or lawful permanent resident (LPR) may, however, be classified as a B-2 visitor if you are satisfied that the fiancé(e) intends to return to a residence abroad soon after the marriage. A B-2 visa may also be issued to an alien coming to the United States:
(U) Simply to meet the family of his or her fiancé;
(U) To become engaged;
(U) To make arrangements for the wedding; or
(U) To renew a relationship with the prospective spouse.
None of this mentions the Visa Waiver Program, but the VWP is explicitly applicable to travelers who would otherwise be admissible as B visitors. At 8 USC 1187(a)(1), the requirement is stated thus:
(a) Establishment of program The Secretary of Homeland Security and the Secretary of State are authorized to establish a program ... under which the requirement [to have a visa] may be waived ... in the case of an alien who meets the following requirements:
(1) Seeking entry as tourist for 90 days or less
The alien is applying for admission during the program as a nonimmigrant visitor (described in section 1101(a)(15)(B) of this title) for a period not exceeding 90 days.
The FAM is a document of the Department of State, but the Customs and Border Protection Inspector's Field Manual agrees in section "(2) Classification: B-2 Visitor for pleasure" (page 50):
(B) Determining eligibility. If otherwise admissible, admit the following as B-2:
(10) An alien coming to marry a U.S. citizen or lawful permanent resident with the intent to return to a residence abroad soon after the marriage;
The section on the VWP notes that it applies to "visitors for business or pleasure" on pages 115 and 116.
To overcome a possible skeptical immigration officer at the border, you can bring evidence of your intention to return to the UK, as well as evidence of your fiancee's plans to move there after marrying you. But I would not offer this evidence before it becomes apparent that the immigration officer is questioning your intention to leave the US.