Get a good quality bike with standard components and you should be able to repair it easily.
As other said avoid cheap low cost bike but also very high end bike that are more likely to use proprietary parts.
For the frame the best option would be steel, if it does break you can easily weld it back with a regular welder.
Aluminum is the second best option, a bit lighter but it will fatigue, so over the years the frame will wear out slightly.
Carbon is the worst for reparability, very fragile and impossible to repair.
It is not really to cross marshy ground but more to spot it and avoid it.
It also helps to keep an eye on all the sheep despite all the tall grass around them.