For mechanical integrity, you should read mechanical strength. If you have a 42-in. pipe, (on the project I am working on) the forces exerted by the pipework on the valve and other in line fittings can be substantial. A valve will have certain wall thickness which is designed not only for the pressure/temperature rating to satisfy the process conditions, but also to "support" the mechanical structure of the valve. The vendor should know how much force the valve can take (compression, tension, shear, etc.). Even with line size valves, excessive piping misalignments can cause undue stress on the valve when it is bolted up.
So if you are using a valve much smaller than the pipe size, you will need to calculate how much force is applied when you bolt up the pipework to the valve. This is usually calculated by the piping stress group. Stress can be caused by either a misalignment of the pipework or just by the weight of the pipe itself. There are tolerances for misalignment, but these do not cause a problem for the matching valve size. There are also piping standards for what structural steel supports are required. Again, these do not cause a problem for the matching valve size.
It is impossible to have a set of standards/codes on a bookshelf and pretend that it will cover all the engineering requirements. The stress analysis is normal engineering practice. The piping discipline in general and the piping stress discipline specifically have established practices and checklists that cover what has to be looked at. There is no mystery about this.
Being a good control and instrumentation engineer also involves good practical understanding of the process and mechanical aspects. Again, there is no mystery about what instrument and controls engineers need to do in this matter. What I always stress with my young engineers is to take a step back and look at the basics of the problem. Yes, there are some difficult applications where the solution may be elusive and will take a SME and a lot of work to solve. However the steps required for the design process is absolutely standard in any established engineering company.
The way to learn this is to do it under the guidance of experienced engineers. This has been the way it has been done successfully forever. Unfortunately, in recent years I have seen a deterioration of engineering skills in the whole industry, and people are forgetting what it takes to do engineering. People are becoming so specialized that in the end, they know nothing. I firmly believe that the expert knows the whole scope. In other words, he or she is a generalist covering many disciplines.
In summary, it is important to understand the code/standards and read up on the established textbooks. But make no mistake, you will not find all your answers there. They do not always tell you how to design.