Definitely don’t use JB weld, and I think you should be able to do it without replacing the box.
Regular electrical boxes are usually 6-32 size screws, ceiling fan boxes usually 8-32. If the holes are stripped, especially with plastic boxes, a lot of times you can get away with using the next size up (either 8-32 or 10-32) and forcibly screwing them in. They will cut new threads in the soft plastic/metal of the box, and you’ll be good to go. This is how most electricians would handle it without replacing the box.
If you want to do a cleaner, less hacky job, you can get a set of drill-taps, like this:
https://www.homedepot.com/p/Klein-Tools-Drill-Tap-Tool-Set-4-Piece-32383SEN/304401087
Or the hand tool: https://a.co/d/6fr9d4Z
You can usually find them in the electrical section of your big-box home improvement store of choice. Just use the next size up and get some appropriate screws.