Your example sentence is fine—but would also be fine with could, and in fact would likely sound better. Would would also work about as well as could. In this specific case, could has the benefit of being “parallel” to the idiom “if these walls could talk,” used to express that a place is very old and a lot of important events have taken place within those walls.¹ Parallelism tends to work well in English.²
On which point, your sentence might be improved by not switching the type of conditional—keeping them consistent may cause more parallelism which might be considered a pleasing effect. Consider this famous, often-quoted banter, usually (at least since World War II) attributed³ to Winston Churchill and some lady of high society (sometimes Nancy Astor):
“If you were my husband, I would poison your tea!”
“If you were my wife, I’d drink it!”
The parallelism sets up the punchline in a way that seems to be pretty popular, considering how long this quotation has been passed around, and how often it continues to be.
(That said, one could easily make arguments for not doing so, and as I said, your original form or the could form you suggest would also work.)
Also, I’d like to say that your example demonstrates a fairly strong grasp of the use and/or abuse of the English language for humorous effect. I’m reminded of the oft-quoted “Time flies like an arrow. Fruit flies like a banana.” You may also be interested in syntactic ambiguity and garden path sentences.
Those events could be historically important, but the phrase “if these walls could talk,” is most often used with respect to homes, and thus personal or family histories rather than textbook histories are more common. It is usually a warm, nostalgic, if not wistful, phrase, though you’ll also hear it said more dryly in crime-investigation type movies and TV shows.
In fact, the entire language is predicated upon it, as you are likely aware. English speakers don’t often learn the names and rules of things, or at least don’t learn them very well—I had to look up “type 2 conditionals”—and instead just judge English we read or hear by how well it lines up with the English we’ve read or heard before. It’s all patterns and parallelism.
Attributed to Churchill, except that the joke predates him by half a century. But Churchill was a witty, sarcastic man who interacted with a lot of members of high society, so it seems plausible and so it sticks. Ironically, the earliest version of it I can find (in a quick search), from 1899, was some random people on a New York train, rather than any members of high society.