About spoke gauge and how that effects spoke breakage. A spoke needs to be properly tensioned to resist failure. A thicker spoke needs more tension, and the rim would need to be able to withstand that tension.
What's commonly done on some commercial ebikes is to install 12 gauge spokes on rims not able to handle the extra tension. If the spoke holes in the rim look like they're pouching out, the rim has failed and spokes will break at the nipple. Spokes will continue to fail, even if replaced.
Carefully inspect the rim spoke holes at the broken ones. If they are distressed the rim is toast, and you need a new wheel.
Lacing a motor into a rim isn't all that difficult, kind of a relaxing evening thing to do. Grin has some great info and videos.
It's still going to be north of a hundred bucks for a rim and spokes.