In Germany, it is not a problem for any company to install a flagpole and to hoist there a company flag. Probably, you will face the problems when you want to install it in a downtown or in a historical center because it needs a special permission. You can quickly learn it from the responsible building authorities if a flagpole installation requires a permission. Generally, everyone can install a flagpole here. Even a permanent flag hoisting is permitted here. But what looks evident in one country, may be different in another. Usually, it is forbidden for companies to hoist their flags for a long time. It is also very important to pay close attention whether something improper is pictured on the flag.
Even if the authorities agree with the permanent attachment of the company flag, it does not mean that there are no neighbor locations, where the flag properly goes against the grain. If the companies are located in the industrial areas, there are no problems. But when the company is located not far from the residential area, here comes a problem again. Then it is always better to cooperate with people and just find the best solutions. Usually, the neighbors are pleased when they are simply asked if a flagpole would disturb or not. So the neighbors would feel the involvement and allow a flagpole installation. A small compromise would get good neighbors.