While infrastructure companies are not immune to a potential economic slowdown, they may provide a longer-term investment opportunity amid an uncertain macroeconomic backdrop.