Yes it's okay for older children to wear diapers when on long car trips or plane trips.
Diapers are very good for children and even teens and adults to wear while on long car trips or plane trips because you don't have to stop to use the restroom.
When you need to pee or poop you can just pee or poop the diaper and change the diaper later.
I wish my parents would've put me in diapers for long car trips after I was potty trained but she didn't.
I sometimes secretly wore diapers on long car trips when I was 8 and 9 years old and it was a good thing because I had to pee a lot.
All I had to do was wet the diaper and then change it later.
All kids should wear diapers when on long car trips or plane rides because it makes it more comfortable for them and it's not good to hold your pee in too long.