Thanks to @danj and @pifia for trying to help. I tried swapping in a known-good battery, and that didn’t help, and other questions about similar symptoms focused on the DC-in board (magsafe). Got a new DC-in board, and took apart the Mac, only to find the existing board was loose and there were several internal screws missing. Someone who didn’t know what he was doing had been screwing around in there! Anyway, it’s possible the existing DC board was good, and re-seating it would have fixed it, but I didn’t want to chance re-assembling the whole thing and not have it work. So I installed the new board, and that did indeed fix the problem.
Is it the screen that’s cracked, or the glass panel that covers the LCD display? It’s far more common for the glass to be cracked, because the glass is exposed. It’s possible, but less common for the LCD to be cracked, but since it’s behind the glass, it’s (somewhat) protected from damage. I suppose it’s possible for both to be cracked, if something was thrown at your iMac with sufficient force (or if your iMac were lying on it’s back, screen up, and something heavy were dropped on it). But when I’ve serviced iMacs with “cracked screens,” it was always just the glass that was cracked. I’ve never had to replace an iMac LCD display.