Not so sure expansion joints are such a good idea unless space constraints in the piping system will not allow sucifecint pipe flexibility. For example take an API 610 pump with a 6” end inlet. API 610 allows 700 lbf on the end nozzle "Fx" and 870 ft*lbf "My". For this hypnotically horizontal pump both distortion of the pump casing and misalignment of the pump and drive shaft were considered when the manufacturer designs their pump to API 610 specs. Looking at the code, the allowable pump shaft displacement ranges between is 0.005 to 0.007 inches in the Z direction when "My" is applied depending on grouting considerations. So far, seems ok per code.
Now assume an engineer is too lazy, cheep, or lacks the skill to do a flexibility analysis on the pipe system and just specifies an expansion joint. This might be fine if it is an atmospheric pressure system; however, lets say this is a booster pump and the system has an inlet pressure of 100 psig. Now there is a load on the pump housing (not the nozzle, but the back of the pump housing) that equals the effective area of the expansion joint time the pressure. This will be in the 4000 lbf range. Assume a 12” high pedestal supporting the pumps. Now you have 4000 ft*lbf on a pedestal supported pump that was designed for 870 ft*lbf moment + 700 ft*lbf from the axial load. Congratulations you have just created a problem by installing an expansion joint. No problem with thermal expansion though, now it is loading from pressure that is the problem.
In addition, now you need to install a rigid anchor that can handle the 4000 lbf load for the pipe side of the expansion joint. Also, you get to ensure the pump base mount is good for 4000 lbf in the axial direction plus the induced moment.
The point here is to show that to recommend an expansion joint, without sound engineering analysis, is a poor practice. In fact, you can create an additional expense for anchors, increase the loading on the pump, and shorten the life of the pump just because the engineering work was not done. Expansion joints on pumps should not be a first choice.