An intermediate node knows the previous hop’s identity and the identity of the next hop as well as the forwarded amount, the hash-lock, and the timeout value. Generally, a forwarder does not learn about the identity of sender and receiver.
Forwarding requests are always padded to the same size, so a forwarder cannot tell how many hops preceded or succeed them. Using information about the topology, a forwarder may be able to make educated guesses about origin and destination if they are the first or last hops and can assume that their neighbor does not participate in forwarding, e.g. because they don’t have (other) public channels or are mobile clients that are only online intermittently. They cannot be certain, because the other nodes may have further private channels.
Two colluding forwarders can easily identify that they’re part of the same payment because all the HTLCs (Hash Time Locked Contracts) along the route use the same hash to set up the forwarding agreements.
There is work in progress to replace HTLCs with Schnorr signature-based Point Time Locked Contracts (PTLCs). In payments using PTLCs each hop has a distinct secret which makes it harder to associate forwarding activity, but even then, amounts, time-out values, and timing of the forwarding requests may suffice to guess that separate hops belong to the same payment. Combining PTLCs with Multipath Payments would make it even harder to associate different hops of payments.