Does building farms destroy strategic resources?
I am afraid to build farms or other improvements because I think I might accidentally replace a late game strategic resource like Uranium before it pops on the map.
Is it a valid reason to be worried about or does the game handle it some other way?
Since resources are predetermined when the map is created, the game won't look at what gets built there before revealing a strategic resource later in the game; because that is what happens, they are revealed.
That being said, no your farms will not replace the resource, nor will any other builder improvement. Say you build a farm on a hill, and then uranium is revealed there. You can easily replace the farm by building the appropriate mine right over top.
As a bonus piece of info, noted here and from my own experience, building a city over top that resource will not remove it either. So if you happen to build on top of coal, uranium etc, later in the game you will just receive it for free - no improvement needed.
You're fine. The resource will still be there when it's revealed, and you can simply build another type of construction to gather that resource more efficiently