Contracting is your best bet.
I set my own hours + fully remote. Typically about 2-3h of team meetings (sprint kickoff, retro, grooming etc) a week. Rest of time is off on your own dev work.
Bill by the hour. As long as you work predictable amount of hours, you can do 20h or 60h week.