Can hardware damage cause a computer (or a smartphone) to make miscalculations or logical errors?
Yes, of course hardware damage can be so subtle that it does not cause catastrophic failure and smoke right away, but just increases probability for a bit to flip here and there. When a single bit flips, it matters a lot where this happens, causing just wrong results or complete crash of software or operating system.

Having said that, even if the device is in perfectly good condition, cosmic rays or radioactive decay can still flip some bits in memory so it can still operate wrong or crash the whole system.