Yeah, just don't give it to them. My kids know to never touch my iPhone or iPad. Even when they were little, I can only think of a handful of times that they even touched them, and that got them time out. The thing kids need most when it comes to discipline is consistency. If you don't give them an inch, they can't take an inch.
We did limited trials once our kids turned 4. My daughter wasn't ready for an iPad. My son was. My daughter was ready when we tried again when she turned 5. The primary reason was because there are a lot of good educational apps out there and our school district uses iPads in the classroom in elementary school.
At first we were very restrictive on screen time, limiting to 20-30 minutes per day. Since then I've relaxed the restrictions somewhat, especially for my daughter during the pandemic. She had a remote learning iPad provided by the school that she had to use for class all day, so there was a lot of iPad time. Honestly she was really good about using it and matured a lot through 2020 into 2021. I've given her a wider range of time she can use it, but there are time restrictions on certain categories of apps, while others such as reading, drawing, and educational games such as math and science are unrestricted (within the larger time limit).
She seems quite well adjusted, as she is equally happy playing outside in the forest in the treehouse and swingset I built for them as she is playing on the iPad. My son, who is younger, would probably prefer to be on his iPad, but we're currently still restricting his screen time and so he spends a lot of time outdoors, as well as playing with his legos and such or drawing in his room. Neither one of them know not to fight us on screen time, as we will just take away the iPad for a full week. We haven't had to do that in ages, and using Apple's built-in tools, it can happen automatically and they know it's time to be done. As with all things when it comes to children, it's about discipline and consistency. When you set clear ground rules, the child knows what to expect and when you consistently follow up with punishment if the rules are broken, it establishes a framework that they can understand and process. There is clearly delineated cause and effect, punishment and reward for their actions. And that's what they respond to.
Some people might say "But my kid is just in a rotten mood, what then?" Well, you can't always predict a mood, but for us what has helped the most with that is consistency in routine. Bad mood often stems from uneven sleep cycles and hunger. Once those needs are consistently met, mood improves. Our children have had a consistent bedtime since they were born. They know to start getting ready for bed every day at 7:30 and that lights go out at 8pm. There is no fighting it because they haven't really known something different. But I've noticed that when traveling or other emergencies come up and bedtime is missed (or when they were younger, nap time) that is when they would get really upset and irritable.
BTW I'm not some guru, but I'm married to a childcare professional who used to wrangle children with autism and went to college for this stuff. I've been supportive and on-board with everything she says and it has worked out well for me!