Good morning Helen,
I'm Doug, and I'm very sorry to hear of your situation. My goal is to provide you with excellent service today.
While I empathize with your concerns over the well water longevity and the aging mechanics of the well, that alone is not a valid reason to terminate a shared well agreement.
Despite the fact that there may be some irregularities in the identification of the well, the simple legal fact is that there is a well agreement between your property and the adjoining property and they are able to draw water from your property. Whether you have one well or a host of wells on your property, the adjacent property owners are able to draw water from your property. Presumably the pipe that was severed leads to the well that is the shared well and that is what the neighbors are entitle to access. Of course, they are responsible for laying new pipe to the extent that their contractors severed the old pipe.
As for the code irregularities, if these are not new codes which do not apply to preexisting wells, then the well agreement will dictate who is responsible for bringing the well to code----via the maintenance clause.
As long as a valid well agreement is in place you do not have any legal basis to terminate, or break out of, it based solely on the facts that you have stated exist. I am sorry.
I understand that you may be disappointed by the Answer you received, as it was not particularly favorable to your situation. Had I been able to provide an Answer which might have given you a successful legal outcome, it would have been my pleasure to do so.
If you have additional questions, you may of course reply back to me and I will be happy to continue to assist you further until your questions have been answered to your satisfaction.
Would you please take a moment to positively rate my service to you based on the understanding of the law I provided by clicking on the rating stars---three stars or more. It is that easy. That is the way I am compensated for having helped you.
Thank you in advance. I wish you the best in your future,