Replace rim because of 4 broken spokes?
On a reasonably built and loaded bike (which is how I hear you describing your bike) with well built wheels I would expect the wheels to last a very long time. With that in mind, several broken spokes with no obvious cause are a red flag. My first thought would be inadequate tension leading to flexing and fatigue. If that is the case, other spokes will likely follow.

With a damaged rim, it might be worth biting the bullet and buying a new wheel – or if you have a good hub, having it rebuilt.

If you're inclined to do the work yourself, replacing spokes isn't too hard and the tools are reasonably inexpensive. There is a knack to truing wheels, but you'll be starting from a reasonable place and all you will likely need to do is to tension the new spokes.