Federal facilities are required to adhere to the flag code.
Non-federal governmental entities are not, and the explanation is more complicated. In theory, the federal government should have very little power over the decision-making of state governments -- this is a principle of federalism and is expressly stated in the 10th Amendment. In practice, however, the federal government has a lot of power over state governments. Congress can condition the allotment of federal monies to states, i.e. block grants, as long as such a condition meets the five point test spelled out in South Dakota v. Dole. The most stringent of these points is that the condition "must not be coercive" so as to apply "irresistible pressure", creating a false choice where accepting money is the only realistic option (thus complying with the conditions). I couldn't find a clause within USC Title 4, Chapter 1 for withholding funds from states in the event of noncompliance, similar to one that exists for the national drinking age. Therefore states (state, county, municipal all treated as an extension of state power under the US Constitution) are not required to to adhere to the flag code.
Theoretically, Congress could pass a new law that would condition the receipt of some federal funds on the states' compliance with the flag code. But the new low could face additional hurdles, since the condition must be "directly related to one of the main purposes for which... [the funds] are expended" (quoting from Dole). This restriction is the reason why states were given the right to opt out of the Obamacare medicare expansion without losing their pre-existing Medicaid funding (567 U. S. ____ (2012) at 51), and is also the reason why the recent "Sanctuary Cities Ban" is having legal trouble. It would be unlikely that any law like this would hold up. It's also worth noting that most states have their own flag law, which makes this whole discussion of the federal law's effect on state facilities.
As you noted, since US v. Eichman, all criminal penalties for violating any flag code have been unenforceable against individuals. My best guess is that the proper method of enforcement in federal buildings is simply administrative action, since violating the code can provide cause for firing federal employees under Chapter 75 of the Civil Service Reform Act of 1978.