I don’t think our military would have a problem taking it back.
But occupying Panama might turn into a problem. Panamanians would hate us. Ugly Americans 1960s style.
The Chinese have a strong foothold there. I’m sure they would stir up trouble, and encourage the local citizens to attack us.
We never have done very well occupying other countries. How big of a military force would we need to keep there after we take over the country?
The big problem with the canal today is the Chinese influence & control.