In case someone finds this thread:

The culprit was indeed the check valve. The valve has a little round door
(about 1.5") that swings open when the flow is in the right direction, and
closes when there is no flow (by gravity) or when the flow is reversed.
The door has a rubber gasket for better seal. The hinge is none other than
a part of the gasket that sticks out at the top of the door and is attached
to the valve housing. My valve was old enough: the rubber had aged and
the hinge had broken. The door floated freely inside the valve and often
the flow would push it against the outlet, blocking it. (In which case
I doubt that tapping with a 2x4 would have made a difference).

I replaced the valve with an almost identical one, except that this one
is transparent (it cost just a few dollars more) so next time it breaks
it will be easier to diagnose the problem. Finding one that doesn't break
would be nicer, but it may not exist :-)

Thanks to everybody!
Luigi