It wont be up to the ex-husband what happens to the properties. He will be given a % of the total estate. This means the ex-wife will be able to decide what happens to her %, and there is nothing that would force her to sell everything, unless there are very high debts or something unusual.
As the custodial parent, it is likely she would get a fairly high %.
The problem with a testamentary trust is that it doesnt stop a house being sold in the meantime and the property is no longer covered...and she would have to actually die for her kids to get the house. This may be a bit extreme.