Jordan Monaghan, 30, is accused of smothering 21-month-old Logan at the Waves pool in Blackburn on August 17, 2013.
It came eight months after he allegedly smothered his daughter Ruby, aged 24 days, while alone with her at the family home on New Year’s Day 2013, Preston Crown Court heard.
Monaghan also denies the murder of his partner, Evie Adams, 23, six years later, by overdosing her with illegal prescriptions drugs in October 2019.
Driver caught 'snoring merrily away' on the M6 near Bamber Bridge with full-beam headlights and engine running
Fulwood flasher wearing balaclava leaves mum and her seven-year-old daughter feeling 'shaken up'
M6 to close overnight to allow two bridges damaged by vehicle strikes to be repaired
Leyland residents claim they are paying grounds maintenance fees to make it look "worse"
Lanes reopen after car crash on M6 brings Preston motorway traffic to a halt with severe delays expected
The digger driver, of Belgrave Close, Blackburn, denies all charges.
Duncan Smith QC, prosecuting, suggested Monaghan killed the children when his partner - the mother of his children, Laura Gray, 28 - told him their relationship was over.
The jury heard that on the day Monaghan took Logan to the swimming pool, his relationship with Miss Gray was on the rocks.
Logan appeared, "happy, talking, behaving normally", and CCTV showed them at reception at 2.06pm then leaving the swimming centre 27 minutes later.
Monaghan said he got changed then realised he had forgotten his son’s swimming cap so they could not go in the pool.
Mr Smith said CCTV showed Mr Monaghan leaving at 2.33pm with the rain cover pulled over a pushchair to disguise the fact his son was dead.
He said CCTV showed Monaghan leaving at 2.33pm with the rain cover pulled over a pushchair to disguise the fact his son was dead.
When he returned home he told Miss Gray that Logan was sleeping, then left the property, telling her to wake him up, to ensure he was "putting distance" between him and the discovery that the toddler was dead, the court heard.
Mr Smith said: "Logan's death achieved what you wanted to achieve, your relationship with Laura Gray continued."
Monaghan replied: "No, our relationship would have continued anyway."
Mr Smith suggested that six years later, Miss Adams told him their relationship was over, a relationship she described as "toxic" in messages recovered from her phone.
Monaghan had replied to her: "I won't keep putting up with you saying we are over."
Mr Monaghan has admitted lying to police about trying to get hold of illegal prescription drugs from WhatsApp and Snapchat contacts and a WhatsApp group called UK Tablets.
But Mr Monaghan said the drugs were for himself and he denied giving Miss Adams any.
In the days before her death Miss Adams sent a text to a friend saying she could not do anything for herself and felt like she was "just dying and weak".
She also became confused, struggled with her balance and could only focus her vision when using one eye - an effect of diazepam, Mr Smith suggested.
He told the jury Monaghan was controlling her access to medical help and "stringing her along" about making appointments with her GP.
Two days before her death Miss Adams sent a message to Monaghan, saying: "I took all them tablets you gave me."
Mr Smith said: "What were the tablets you were giving her?"
"Paracetamol," Monaghan replied.
On the night Miss Adams died on October 24, 2019, Monaghan again "made himself scarce" by leaving the house they shared in Hazel Close, Blackburn.
Mr Smith said: "You had left Evie Adams to be discovered by someone else, just as you left Logan to be discovered by Laura Gray?"
Monaghan replied: "No I did not."
Mr Monaghan denies three counts of murder, two counts of attempted murder and two counts of cruelty to a third child, who cannot be identified, all between January 1, 2013 and October 24, 2019.
The trial was adjourned until Thursday morning (December 2).
It is thanks to our loyal readers that we can continue to provide the trusted news, analysis and insight that matters to you.
For unlimited access to our unrivalled local reporting, you can take out a subscription HERE and help support the work of our dedicated team of reporters.